boolean (final Module[] modules, @Nullable final ModuleGroup targetGroup) { final ModuleStructureConfigurable rootConfigurable = ProjectStructureConfigurable.getInstance(myProject).getModulesConfig(); if (rootConfigurable.updateProjectTree(modules)) { //inside project root editor if (targetGroup != null) { rootConfigurable.selectNodeInTree(targetGroup.toString()); } else { rootConfigurable.selectNodeInTree(modules[0].getName()); } return true; } return false; }