use of com.intellij.xdebugger.settings.DebuggerConfigurableProvider in project intellij-community by JetBrains.
the class DebuggerConfigurable method compute.
private void compute() {
if (myChildren != null) {
return;
}
List<Configurable> configurables = new SmartList<>();
configurables.add(new DataViewsConfigurable());
DebuggerConfigurableProvider[] providers = DebuggerConfigurableProvider.EXTENSION_POINT.getExtensions();
computeMergedConfigurables(providers, configurables);
for (DebuggerConfigurableProvider provider : providers) {
configurables.addAll(provider.getConfigurables(DebuggerSettingsCategory.ROOT));
}
MergedCompositeConfigurable mergedGeneralConfigurable = computeGeneralConfigurables(providers);
if (configurables.isEmpty() && mergedGeneralConfigurable == null) {
myRootConfigurable = null;
myChildren = EMPTY_CONFIGURABLES;
} else if (configurables.size() == 1) {
Configurable firstConfigurable = configurables.get(0);
if (mergedGeneralConfigurable == null) {
myRootConfigurable = firstConfigurable;
myChildren = EMPTY_CONFIGURABLES;
} else {
Configurable[] generalConfigurables = mergedGeneralConfigurable.children;
Configurable[] mergedArray = new Configurable[generalConfigurables.length + 1];
System.arraycopy(generalConfigurables, 0, mergedArray, 0, generalConfigurables.length);
mergedArray[generalConfigurables.length] = firstConfigurable;
myRootConfigurable = new MergedCompositeConfigurable("", "", mergedArray);
myChildren = firstConfigurable instanceof SearchableConfigurable.Parent ? ((Parent) firstConfigurable).getConfigurables() : EMPTY_CONFIGURABLES;
}
} else {
myChildren = configurables.toArray(new Configurable[configurables.size()]);
myRootConfigurable = mergedGeneralConfigurable;
}
}
Aggregations