void (ProjectNode node) { MavenProject project = node.getMavenProject(); ProjectsGroupNode newParentNode = myRoot; if (getProjectsNavigator().getGroupModules()) { MavenProject aggregator = getProjectsManager().findAggregator(project); if (aggregator != null) { ProjectNode aggregatorNode = findNodeFor(aggregator); if (aggregatorNode != null && aggregatorNode.isVisible()) { newParentNode = aggregatorNode; } } } node.updateProject(); reconnectNode(node, newParentNode); ProjectsGroupNode newModulesParentNode = getProjectsNavigator().getGroupModules() && node.isVisible() ? node : myRoot; for (MavenProject each : getProjectsManager().getModules(project)) { ProjectNode moduleNode = findNodeFor(each); if (moduleNode != null && !moduleNode.getParent().equals(newModulesParentNode)) { reconnectNode(moduleNode, newModulesParentNode); } } }