Search in sources :

Example 1 with ContentEntriesEditor

use of com.intellij.openapi.roots.ui.configuration.ContentEntriesEditor in project ballerina by ballerina-lang.

the class BallerinaModuleEditorsProvider method createEditors.

@Override
public ModuleConfigurationEditor[] createEditors(@NotNull ModuleConfigurationState state) {
    ModifiableRootModel rootModel = state.getRootModel();
    Module module = rootModel.getModule();
    if (!(ModuleType.get(module) instanceof BallerinaModuleType)) {
        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) ContentEntriesEditor(com.intellij.openapi.roots.ui.configuration.ContentEntriesEditor) ModuleConfigurationEditor(com.intellij.openapi.module.ModuleConfigurationEditor) ClasspathEditor(com.intellij.openapi.roots.ui.configuration.ClasspathEditor) Module(com.intellij.openapi.module.Module) BallerinaModuleType(org.ballerinalang.plugins.idea.BallerinaModuleType)

Aggregations

Module (com.intellij.openapi.module.Module)1 ModuleConfigurationEditor (com.intellij.openapi.module.ModuleConfigurationEditor)1 ModifiableRootModel (com.intellij.openapi.roots.ModifiableRootModel)1 ClasspathEditor (com.intellij.openapi.roots.ui.configuration.ClasspathEditor)1 ContentEntriesEditor (com.intellij.openapi.roots.ui.configuration.ContentEntriesEditor)1 BallerinaModuleType (org.ballerinalang.plugins.idea.BallerinaModuleType)1