use of com.intellij.openapi.options.SearchableConfigurable in project intellij-community by JetBrains.
the class GeneralSettingsConfigurable method createComponent.
@Override
public JComponent createComponent() {
if (myComponent == null) {
myComponent = new MyComponent();
}
myComponent.myChkAutoSaveIfInactive.addChangeListener(e -> myComponent.myTfInactiveTimeout.setEditable(myComponent.myChkAutoSaveIfInactive.isSelected()));
List<SearchableConfigurable> list = getConfigurables();
if (!list.isEmpty()) {
myComponent.myPluginOptionsPanel.setLayout(new GridLayout(list.size(), 1));
for (Configurable c : list) {
myComponent.myPluginOptionsPanel.add(c.createComponent());
}
}
return myComponent.myPanel;
}
use of com.intellij.openapi.options.SearchableConfigurable 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());
}
}
}
}
Aggregations