com.intellij.openapi.roots.ui.configuration.ModuleConfigurationState Java Examples
The following examples show how to use
com.intellij.openapi.roots.ui.configuration.ModuleConfigurationState.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GaugeModuleConfigurationProvider.java From Intellij-Plugin with Apache License 2.0 | 6 votes |
@Override public ModuleConfigurationEditor[] createEditors(ModuleConfigurationState state) { final Module module = state.getRootModel().getModule(); final ModuleType moduleType = ModuleType.get(module); if (!(moduleType instanceof GaugeModuleType)) { 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)); return editors.toArray(new ModuleConfigurationEditor[editors.size()]); }
Example #2
Source File: DojoToolkitModuleEditorProvider.java From needsmoredojo with Apache License 2.0 | 6 votes |
@Override public ModuleConfigurationEditor[] createEditors(ModuleConfigurationState moduleConfigurationState) { final Module module = moduleConfigurationState.getRootModel().getModule(); if (ModuleType.get(module) != DojoToolkitModuleType.getInstance()) return ModuleConfigurationEditor.EMPTY; final DefaultModuleConfigurationEditorFactory editorFactory = DefaultModuleConfigurationEditorFactory.getInstance(); List<ModuleConfigurationEditor> editors = new ArrayList<ModuleConfigurationEditor>(); //editors.add(editorFactory.createModuleContentRootsEditor(moduleConfigurationState)); for(Module theModule : ModuleManager.getInstance(moduleConfigurationState.getProject()).getModules()) { ModuleType theType = ModuleType.get(theModule); int i=0; } return editors.toArray(new ModuleConfigurationEditor[editors.size()]); }
Example #3
Source File: OCamlDefaultModuleEditorsProvider.java From reasonml-idea-plugin with MIT License | 5 votes |
@NotNull @Override public ModuleConfigurationEditor[] createEditors(@NotNull ModuleConfigurationState state) { Module module = state.getRootModel().getModule(); if (ModuleType.get(module) instanceof OCamlModuleType) { return new ModuleConfigurationEditor[]{ new OCamlContentEntriesEditor(module.getName(), state) }; } return ModuleConfigurationEditor.EMPTY; }
Example #4
Source File: HaskellModuleConfigurationEditor.java From intellij-haskforce with Apache License 2.0 | 5 votes |
public ModuleConfigurationEditor[] createEditors(ModuleConfigurationState state) { Module module = state.getRootModel().getModule(); if (!(ModuleType.get(module) instanceof HaskellModuleType)) { return ModuleConfigurationEditor.EMPTY; } return new ModuleConfigurationEditor[]{ new JavaContentEntriesEditor(module.getName(), state), // new CabalFilesEditor(state), new ClasspathEditor(state), }; }
Example #5
Source File: HaxeModuleConfigurationEditorProvider.java From intellij-haxe with Apache License 2.0 | 5 votes |
public ModuleConfigurationEditor[] createEditors(final ModuleConfigurationState state) { final Module module = state.getRootModel().getModule(); if (ModuleType.get(module) != HaxeModuleType.getInstance()) { return ModuleConfigurationEditor.EMPTY; } return new ModuleConfigurationEditor[]{ new CommonContentEntriesEditor(module.getName(), state, JavaSourceRootType.SOURCE, JavaSourceRootType.TEST_SOURCE), new ClasspathEditor(state), new HaxeModuleConfigurationEditor(state) }; }
Example #6
Source File: ExtensionCheckedTreeNode.java From consulo with Apache License 2.0 | 5 votes |
public ExtensionCheckedTreeNode(@Nullable ModuleExtensionProviderEP providerEP, @Nonnull ModuleConfigurationState state, ExtensionEditor extensionEditor) { super(null); myProviderEP = providerEP; myState = state; myExtensionEditor = extensionEditor; String parentKey = null; if (providerEP != null) { parentKey = providerEP.key; final ModifiableRootModel model = state.getRootModel(); if (model != null) { myExtension = model.getExtensionWithoutCheck(providerEP.getKey()); } } setAllowsChildren(true); Vector<TreeNode> child = new Vector<>(); for (ModuleExtensionProviderEP ep : ModuleExtensionProviders.getProviders()) { if (Comparing.equal(ep.parentKey, parentKey)) { final ExtensionCheckedTreeNode e = new ExtensionCheckedTreeNode(ep, state, myExtensionEditor); e.setParent(this); child.add(e); } } Collections.sort(child, ExtensionProviderEPComparator.INSTANCE); setUserObject(myExtension); // at java 9 children is Vector<TreeNode>() //noinspection Convert2Diamond children = child.isEmpty() ? null : child; }
Example #7
Source File: CppModuleConfigurationEditorProvider.java From CppTools with Apache License 2.0 | 5 votes |
public ModuleConfigurationEditor[] createEditors(ModuleConfigurationState state) { final Module module = state.getRootModel().getModule(); if (ModuleType.get(module) != CppModuleType.getInstance()) return new ModuleConfigurationEditor[0]; ModifiableRootModel rootModel = state.getRootModel(); DefaultModuleConfigurationEditorFactory defaultModuleConfigurationEditorFactory = DefaultModuleConfigurationEditorFactory.getInstance(); return new ModuleConfigurationEditor[] { defaultModuleConfigurationEditorFactory.createModuleContentRootsEditor(state), defaultModuleConfigurationEditorFactory.createClasspathEditor(state), }; }
Example #8
Source File: OCamlContentEntriesEditor.java From reasonml-idea-plugin with MIT License | 4 votes |
OCamlContentEntriesEditor(@NotNull String moduleName, @NotNull ModuleConfigurationState state) { super(moduleName, state, JavaSourceRootType.SOURCE, JavaSourceRootType.TEST_SOURCE, OCamlBinaryRootType.BINARY); }
Example #9
Source File: HaxeModuleConfigurationEditor.java From intellij-haxe with Apache License 2.0 | 4 votes |
public HaxeModuleConfigurationEditor(ModuleConfigurationState state) { haxeConfigurationEditor = new HaxeConfigurationEditor(state.getRootModel().getModule(), state.getRootModel().getModuleExtension( CompilerModuleExtension.class)); }
Example #10
Source File: ClasspathPanelImpl.java From consulo with Apache License 2.0 | 4 votes |
@Override public ModuleConfigurationState getModuleConfigurationState() { return myState; }
Example #11
Source File: ClasspathTableModel.java From consulo with Apache License 2.0 | 4 votes |
public ClasspathTableModel(final ModuleConfigurationState state, StructureConfigurableContext context) { myState = state; myContext = context; init(); }
Example #12
Source File: ClasspathPanel.java From consulo with Apache License 2.0 | votes |
ModuleConfigurationState getModuleConfigurationState();