use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class VcsManagerConfigurable method buildConfigurables.
@Override
protected Configurable[] buildConfigurables() {
myGeneralPanel = new VcsGeneralConfigurationConfigurable(myProject, this);
List<Configurable> result = new ArrayList<>();
result.add(myGeneralPanel);
result.add(new VcsBackgroundOperationsConfigurable(myProject));
if (!myProject.isDefault()) {
result.add(new IgnoredSettingsPanel(myProject));
}
/*if (!myProject.isDefault()) {
result.add(new CacheSettingsPanel(myProject));
}*/
result.add(new IssueNavigationConfigurationPanel(myProject));
if (!myProject.isDefault()) {
result.add(new ChangelistConflictConfigurable(ChangeListManagerImpl.getInstanceImpl(myProject)));
}
result.add(new ShelfProjectConfigurable(myProject));
for (VcsConfigurableProvider provider : VcsConfigurableProvider.EP_NAME.getExtensions()) {
final Configurable configurable = provider.getConfigurable(myProject);
if (configurable != null) {
result.add(configurable);
}
}
VcsDescriptor[] vcses = ProjectLevelVcsManager.getInstance(myProject).getAllVcss();
for (VcsDescriptor vcs : vcses) {
result.add(createVcsConfigurableWrapper(vcs));
}
return result.toArray(new Configurable[result.size()]);
}
use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class SearchUtil method processConfigurables.
private static void processConfigurables(Configurable[] configurables, Map<SearchableConfigurable, Set<OptionDescription>> options) {
for (Configurable configurable : configurables) {
if (configurable instanceof SearchableConfigurable) {
//ignore invisible root nodes
if (configurable instanceof SearchableConfigurable.Parent && !((SearchableConfigurable.Parent) configurable).isVisible()) {
continue;
}
Set<OptionDescription> configurableOptions = new TreeSet<>();
options.put((SearchableConfigurable) configurable, configurableOptions);
if (configurable instanceof MasterDetails) {
final MasterDetails md = (MasterDetails) configurable;
md.initUi();
processComponent(configurable, configurableOptions, md.getMaster());
processComponent(configurable, configurableOptions, md.getDetails().getComponent());
} else {
processComponent(configurable, configurableOptions, configurable.createComponent());
}
}
}
}
use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class MavenSettingsTest method testNotModifiedAfterCreation.
public void testNotModifiedAfterCreation() throws Exception {
MavenSettings s = new MavenSettings(myProject);
s.createComponent();
s.reset();
try {
assertFalse(s.isModified());
} finally {
//prevent memory leaks
s.disposeUIResources();
}
for (Configurable each : s.getConfigurables()) {
each.createComponent();
each.reset();
try {
assertFalse(each.isModified());
} finally {
//prevent memory leaks
each.disposeUIResources();
}
}
}
use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class CompositeConfigurable method createComponent.
public JComponent createComponent() {
tabbedPane = new JBTabbedPane();
for (Configurable configurable : configurables) {
JComponent component = configurable.createComponent();
tabbedPane.add(configurable.getDisplayName(), component);
}
return tabbedPane;
}
use of com.intellij.openapi.options.Configurable in project intellij-community by JetBrains.
the class SearchEverywhereAction method fillConfigurablesIds.
private void fillConfigurablesIds(String pathToParent, Configurable[] configurables) {
for (Configurable configurable : configurables) {
if (configurable instanceof SearchableConfigurable) {
final String id = ((SearchableConfigurable) configurable).getId();
String name = configurable.getDisplayName();
if (pathToParent != null) {
name = pathToParent + " -> " + name;
}
myConfigurables.put(id, name);
if (configurable instanceof SearchableConfigurable.Parent) {
fillConfigurablesIds(name, ((SearchableConfigurable.Parent) configurable).getConfigurables());
}
}
}
}
Aggregations