com.intellij.openapi.roots.ui.configuration.DefaultModuleConfigurationEditorFactory Java Examples

The following examples show how to use com.intellij.openapi.roots.ui.configuration.DefaultModuleConfigurationEditorFactory. 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 vote down vote up
@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 vote down vote up
@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: CppModuleConfigurationEditorProvider.java    From CppTools with Apache License 2.0 5 votes vote down vote up
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),
  };
}