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)); } } } }
private static ModuleConfigurationEditorProvider[] collectProviders(@NotNull Module module) { List<ModuleConfigurationEditorProvider> result = new ArrayList<>(); result.addAll(ServiceKt.getComponents(module, ModuleConfigurationEditorProvider.class)); for (ModuleConfigurationEditorProvider component : result) { reportDeprecatedModuleEditor(component.getClass()); } ContainerUtil.addAll( result, Extensions.getExtensions(ModuleConfigurationEditorProvider.EP_NAME, module)); return result.toArray(new ModuleConfigurationEditorProvider[result.size()]); }
private void createEditors(Module module) { ModuleConfigurationEditorProvider[] providers = collectProviders(module); ModuleConfigurationState state = createModuleConfigurationState(); for (ModuleConfigurationEditorProvider provider : providers) { ContainerUtil.addAll(myEditors, provider.createEditors(state)); } for (final Configurable moduleConfigurable : myModule.getComponents(Configurable.class)) { myEditors.add(new ModuleConfigurableWrapper(moduleConfigurable)); } for (ModuleConfigurableEP extension : myModule.getExtensions(MODULE_CONFIGURABLES)) { myEditors.add(new ModuleConfigurableWrapper(extension.createConfigurable())); } }