use of com.intellij.openapi.module.ModuleConfigurationEditor 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()]);
}
use of com.intellij.openapi.module.ModuleConfigurationEditor 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()]);
}
use of com.intellij.openapi.module.ModuleConfigurationEditor in project intellij-community by JetBrains.
the class ModuleEditor method createEditors.
private void createEditors(@Nullable Module module) {
if (module == null)
return;
ModuleConfigurationState state = createModuleConfigurationState();
for (ModuleConfigurationEditorProvider provider : collectProviders(module)) {
ModuleConfigurationEditor[] editors = provider.createEditors(state);
if (editors.length > 0 && provider instanceof ModuleConfigurationEditorProviderEx && ((ModuleConfigurationEditorProviderEx) provider).isCompleteEditorSet()) {
myEditors.clear();
ContainerUtil.addAll(myEditors, editors);
break;
} else {
ContainerUtil.addAll(myEditors, editors);
}
}
for (Configurable moduleConfigurable : ServiceKt.getComponents(module, Configurable.class)) {
reportDeprecatedModuleEditor(moduleConfigurable.getClass());
myEditors.add(new ModuleConfigurableWrapper(moduleConfigurable));
}
for (ModuleConfigurableEP extension : module.getExtensions(MODULE_CONFIGURABLES)) {
if (extension.canCreateConfigurable()) {
Configurable configurable = extension.createConfigurable();
if (configurable != null) {
reportDeprecatedModuleEditor(configurable.getClass());
myEditors.add(new ModuleConfigurableWrapper(configurable));
}
}
}
}
use of com.intellij.openapi.module.ModuleConfigurationEditor in project android by JetBrains.
the class AndroidModuleEditor method apply.
public void apply() throws ConfigurationException {
String appId = getApplicationId(myProject);
for (ModuleConfigurationEditor editor : myEditors) {
if (appId != null) {
UsageTracker.getInstance().log(AndroidStudioEvent.newBuilder().setCategory(AndroidStudioEvent.EventCategory.PROJECT_STRUCTURE_DIALOG).setKind(AndroidStudioEvent.EventKind.PROJECT_STRUCTURE_DIALOG_TOP_TAB_SAVE).setProjectId(AndroidStudioUsageTracker.anonymizeUtf8(appId)));
}
editor.saveData();
editor.apply();
}
}
use of com.intellij.openapi.module.ModuleConfigurationEditor in project android by JetBrains.
the class AndroidModuleEditor method dispose.
@Override
public void dispose() {
for (final ModuleConfigurationEditor myEditor : myEditors) {
myEditor.disposeUIResources();
}
myEditors.clear();
myGenericSettingsPanel = null;
}
Aggregations