Search in sources :

Example 1 with DefaultModuleConfigurationEditorFactory

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

the class PythonModuleConfigurationEditorProvider method createEditors.

public ModuleConfigurationEditor[] createEditors(final ModuleConfigurationState state) {
    final Module module = state.getRootModel().getModule();
    if (!(ModuleType.get(module) instanceof PythonModuleType))
        return ModuleConfigurationEditor.EMPTY;
    final DefaultModuleConfigurationEditorFactory editorFactory = DefaultModuleConfigurationEditorFactory.getInstance();
    final List<ModuleConfigurationEditor> editors = new ArrayList<>();
    editors.add(new PyContentEntriesEditor(module, state, false, JavaSourceRootType.SOURCE));
    editors.add(editorFactory.createClasspathEditor(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) Module(com.intellij.openapi.module.Module)

Example 2 with DefaultModuleConfigurationEditorFactory

use of com.intellij.openapi.roots.ui.configuration.DefaultModuleConfigurationEditorFactory 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

Module (com.intellij.openapi.module.Module)2 ModuleConfigurationEditor (com.intellij.openapi.module.ModuleConfigurationEditor)2 DefaultModuleConfigurationEditorFactory (com.intellij.openapi.roots.ui.configuration.DefaultModuleConfigurationEditorFactory)2 ArrayList (java.util.ArrayList)2 PluginModuleBuildConfEditor (org.jetbrains.idea.devkit.build.PluginModuleBuildConfEditor)1