Search in sources :

Example 1 with GoModuleType

use of com.goide.GoModuleType in project go-lang-idea-plugin by go-lang-plugin-org.

the class GoModuleEditorsProvider method createEditors.

@Override
public ModuleConfigurationEditor[] createEditors(@NotNull ModuleConfigurationState state) {
    ModifiableRootModel rootModel = state.getRootModel();
    Module module = rootModel.getModule();
    if (!(ModuleType.get(module) instanceof GoModuleType)) {
        return ModuleConfigurationEditor.EMPTY;
    }
    String moduleName = module.getName();
    List<ModuleConfigurationEditor> editors = ContainerUtil.newArrayList();
    editors.add(new ContentEntriesEditor(moduleName, state));
    editors.add(new OutputEditorEx(state));
    editors.add(new ClasspathEditor(state));
    return editors.toArray(new ModuleConfigurationEditor[editors.size()]);
}
Also used : ModifiableRootModel(com.intellij.openapi.roots.ModifiableRootModel) ModuleConfigurationEditor(com.intellij.openapi.module.ModuleConfigurationEditor) Module(com.intellij.openapi.module.Module) GoModuleType(com.goide.GoModuleType)

Aggregations

GoModuleType (com.goide.GoModuleType)1 Module (com.intellij.openapi.module.Module)1 ModuleConfigurationEditor (com.intellij.openapi.module.ModuleConfigurationEditor)1 ModifiableRootModel (com.intellij.openapi.roots.ModifiableRootModel)1