Search in sources :

Example 6 with ModuleStructureConfigurable

use of com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigurable in project intellij-community by JetBrains.

the class ModulesConfigurator method showFacetSettingsDialog.

public static boolean showFacetSettingsDialog(@NotNull final Facet facet, @Nullable final String tabNameToSelect) {
    final Project project = facet.getModule().getProject();
    final ProjectStructureConfigurable config = ProjectStructureConfigurable.getInstance(project);
    return ShowSettingsUtil.getInstance().editConfigurable(project, config, () -> {
        final ModuleStructureConfigurable modulesConfig = config.getModulesConfig();
        config.select(facet, true).doWhenDone(() -> {
            if (tabNameToSelect != null) {
                FacetEditorImpl facetEditor = modulesConfig.getFacetConfigurator().getOrCreateEditor(facet);
                facetEditor.setSelectedTabName(tabNameToSelect);
            }
        });
    });
}
Also used : Project(com.intellij.openapi.project.Project) ModuleStructureConfigurable(com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigurable) FacetEditorImpl(com.intellij.facet.impl.ui.FacetEditorImpl)

Example 7 with ModuleStructureConfigurable

use of com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigurable in project intellij-plugins by JetBrains.

the class FlexBCConfigurator method apply.

public void apply() throws ConfigurationException {
    final ModuleStructureConfigurable c = ProjectStructureConfigurable.getInstance(myConfigEditor.getProject()).getModulesConfig();
    for (final CompositeConfigurable configurable : myConfigurablesMap.values()) {
        c.ensureInitialized(configurable);
        if (configurable.isModified()) {
            configurable.apply();
        }
    }
    if (myConfigEditor.isModified()) {
        myConfigEditor.checkCanCommit();
        myConfigEditor.commit();
    }
}
Also used : ModuleStructureConfigurable(com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigurable) CompositeConfigurable(com.intellij.lang.javascript.flex.projectStructure.ui.CompositeConfigurable)

Aggregations

ModuleStructureConfigurable (com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigurable)7 CompositeConfigurable (com.intellij.lang.javascript.flex.projectStructure.ui.CompositeConfigurable)3 Module (com.intellij.openapi.module.Module)2 FacetEditorImpl (com.intellij.facet.impl.ui.FacetEditorImpl)1 AnAction (com.intellij.openapi.actionSystem.AnAction)1 Project (com.intellij.openapi.project.Project)1 LibraryType (com.intellij.openapi.roots.libraries.LibraryType)1 ChooseModulesDialog (com.intellij.openapi.roots.ui.configuration.ChooseModulesDialog)1 ProjectLibrariesConfigurable (com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectLibrariesConfigurable)1 StructureConfigurableContext (com.intellij.openapi.roots.ui.configuration.projectRoot.StructureConfigurableContext)1 ModuleProjectStructureElement (com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ModuleProjectStructureElement)1 MasterDetailsComponent (com.intellij.openapi.ui.MasterDetailsComponent)1 Place (com.intellij.ui.navigation.Place)1 ArrayList (java.util.ArrayList)1