public void updateProfiles() {
    Collection<Pair<String, MavenProfileKind>> profiles = myMavenProjectsStructure.getProjectsManager().getProfilesWithStates();

    List<ProfileNode> newNodes = new ArrayList<>(profiles.size());
    for (Pair<String, MavenProfileKind> each : profiles) {
      ProfileNode node = findOrCreateNodeFor(each.first);
      node.setState(each.second);
      newNodes.add(node);
    }

    myProfileNodes.clear();
    myProfileNodes.addAll(newNodes);
    sort(myProfileNodes);
    childrenChanged();
  }
public void updateProfiles()