Search in sources :

Example 11 with ModuleConfigurationEditor

use of com.intellij.openapi.module.ModuleConfigurationEditor in project intellij-community by JetBrains.

the class ModuleEditor method dispose.

@Override
public void dispose() {
    try {
        for (final ModuleConfigurationEditor myEditor : myEditors) {
            myEditor.disposeUIResources();
        }
        myEditors.clear();
        disposeCenterPanel();
        if (myModifiableRootModel != null) {
            myModifiableRootModel.dispose();
        }
        myGenericSettingsPanel = null;
    } finally {
        myModifiableRootModel = null;
        myModifiableRootModelProxy = null;
    }
}
Also used : ModuleConfigurationEditor(com.intellij.openapi.module.ModuleConfigurationEditor)

Example 12 with ModuleConfigurationEditor

use of com.intellij.openapi.module.ModuleConfigurationEditor in project intellij-community by JetBrains.

the class ModuleEditor method apply.

public ModifiableRootModel apply() throws ConfigurationException {
    try {
        for (ModuleConfigurationEditor editor : myEditors) {
            editor.saveData();
            editor.apply();
        }
        return myModifiableRootModel;
    } finally {
        myModifiableRootModel = null;
        myModifiableRootModelProxy = null;
    }
}
Also used : ModuleConfigurationEditor(com.intellij.openapi.module.ModuleConfigurationEditor)

Example 13 with ModuleConfigurationEditor

use of com.intellij.openapi.module.ModuleConfigurationEditor in project intellij-community by JetBrains.

the class ModuleEditor method init.

public void init(History history) {
    myHistory = history;
    for (ModuleConfigurationEditor each : myEditors) {
        if (each instanceof ModuleElementsEditor) {
            ((ModuleElementsEditor) each).setHistory(myHistory);
        }
    }
    restoreSelectedEditor();
}
Also used : ModuleConfigurationEditor(com.intellij.openapi.module.ModuleConfigurationEditor)

Example 14 with ModuleConfigurationEditor

use of com.intellij.openapi.module.ModuleConfigurationEditor in project intellij-community by JetBrains.

the class PluginModuleEditorsProvider method createEditors.

public ModuleConfigurationEditor[] createEditors(ModuleConfigurationState state) {
    final Module module = state.getRootModel().getModule();
    if (ModuleType.get(module) != PluginModuleType.getInstance())
        return ModuleConfigurationEditor.EMPTY;
    final DefaultModuleConfigurationEditorFactory editorFactory = DefaultModuleConfigurationEditorFactory.getInstance();
    List<ModuleConfigurationEditor> editors = new ArrayList<>();
    editors.add(editorFactory.createModuleContentRootsEditor(state));
    editors.add(editorFactory.createOutputEditor(state));
    editors.add(editorFactory.createClasspathEditor(state));
    editors.add(new PluginModuleBuildConfEditor(state));
    return editors.toArray(new ModuleConfigurationEditor[editors.size()]);
}
Also used : DefaultModuleConfigurationEditorFactory(com.intellij.openapi.roots.ui.configuration.DefaultModuleConfigurationEditorFactory) ModuleConfigurationEditor(com.intellij.openapi.module.ModuleConfigurationEditor) ArrayList(java.util.ArrayList) PluginModuleBuildConfEditor(org.jetbrains.idea.devkit.build.PluginModuleBuildConfEditor) Module(com.intellij.openapi.module.Module)

Aggregations

ModuleConfigurationEditor (com.intellij.openapi.module.ModuleConfigurationEditor)14 Module (com.intellij.openapi.module.Module)6 ArrayList (java.util.ArrayList)4 DefaultModuleConfigurationEditorFactory (com.intellij.openapi.roots.ui.configuration.DefaultModuleConfigurationEditorFactory)3 ModifiableRootModel (com.intellij.openapi.roots.ModifiableRootModel)2 GoModuleType (com.goide.GoModuleType)1 JavaModuleType (com.intellij.openapi.module.JavaModuleType)1 ModuleType (com.intellij.openapi.module.ModuleType)1 Configurable (com.intellij.openapi.options.Configurable)1 ModuleConfigurableEP (com.intellij.openapi.options.ModuleConfigurableEP)1 TabbedPaneWrapper (com.intellij.ui.TabbedPaneWrapper)1 JBTabbedPane (com.intellij.ui.components.JBTabbedPane)1 ChangeEvent (javax.swing.event.ChangeEvent)1 AndroidFacet (org.jetbrains.android.facet.AndroidFacet)1 NotNull (org.jetbrains.annotations.NotNull)1 PluginModuleBuildConfEditor (org.jetbrains.idea.devkit.build.PluginModuleBuildConfEditor)1