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));
        }
      }
    }
  }
Example #2
0
  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()));
    }
  }