use of com.intellij.openapi.options.Configurable 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.options.Configurable in project intellij-community by JetBrains.
the class ProjectStructureConfigurable method initSidePanel.
private void initSidePanel() {
boolean isDefaultProject = myProject == ProjectManager.getInstance().getDefaultProject();
mySidePanel = new SidePanel(this);
mySidePanel.addSeparator("Project Settings");
addProjectConfig();
if (!isDefaultProject) {
addModulesConfig();
}
addProjectLibrariesConfig();
if (!isDefaultProject) {
addFacetsConfig();
addArtifactsConfig();
}
ProjectStructureConfigurableContributor[] adders = ProjectStructureConfigurableContributor.EP_NAME.getExtensions();
for (ProjectStructureConfigurableContributor adder : adders) {
for (Configurable configurable : adder.getExtraProjectConfigurables(myProject, myContext)) {
addConfigurable(configurable, true);
}
}
mySidePanel.addSeparator("Platform Settings");
addJdkListConfig();
addGlobalLibrariesConfig();
for (ProjectStructureConfigurableContributor adder : adders) {
for (Configurable configurable : adder.getExtraPlatformConfigurables(myProject, myContext)) {
addConfigurable(configurable, true);
}
}
mySidePanel.addSeparator("--");
addErrorPane();
}
use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class SearchableOptionsTest method testFindCodeTemplates.
public void testFindCodeTemplates() {
ConfigurableGroup[] groups = ShowSettingsUtilImpl.getConfigurableGroups(getProject(), false);
ConfigurableHit configurables = SearchableOptionsRegistrar.getInstance().getConfigurables(groups, DocumentEvent.EventType.INSERT, null, "method", getProject());
Set<Configurable> configurableSet = configurables.getAll();
for (Configurable configurable : configurableSet) {
if (configurable.getDisplayName().equals(new AllFileTemplatesConfigurable(getProject()).getDisplayName())) {
return;
}
}
fail("File Templates are not found");
}
use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class SearchUtil method expandGroup.
public static List<Configurable> expandGroup(final ConfigurableGroup group) {
final Configurable[] configurables = group.getConfigurables();
List<Configurable> result = new ArrayList<>();
ContainerUtil.addAll(result, configurables);
for (Configurable each : configurables) {
addChildren(each, result);
}
return ContainerUtil.filter(result, configurable -> !(configurable instanceof SearchableConfigurable.Parent) || ((SearchableConfigurable.Parent) configurable).isVisible());
}
use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class SearchUtil method addChildren.
private static void addChildren(Configurable configurable, List<Configurable> list) {
if (configurable instanceof Configurable.Composite) {
final Configurable[] kids = ((Configurable.Composite) configurable).getConfigurables();
for (Configurable eachKid : kids) {
list.add(eachKid);
addChildren(eachKid, list);
}
}
}
Aggregations