use of com.intellij.application.options.CodeStyleAbstractPanel in project intellij-community by JetBrains.
the class CodeStyleMainPanel method ensurePanel.
private NewCodeStyleSettingsPanel ensurePanel(final CodeStyleScheme scheme) {
String name = scheme.getName();
if (!mySettingsPanels.containsKey(name)) {
NewCodeStyleSettingsPanel panel = myFactory.createPanel(scheme);
panel.reset(scheme.getCodeStyleSettings());
panel.setModel(myModel);
CodeStyleAbstractPanel settingsPanel = panel.getSelectedPanel();
if (settingsPanel instanceof TabbedLanguageCodeStylePanel) {
TabbedLanguageCodeStylePanel tabbedPanel = (TabbedLanguageCodeStylePanel) settingsPanel;
tabbedPanel.setListener(this);
String currentTab = myProperties.getValue(getSelectedTabPropertyName(tabbedPanel));
if (currentTab != null) {
tabbedPanel.changeTab(currentTab);
}
}
mySettingsPanels.put(name, panel);
mySettingsPanel.add(scheme.getName(), panel);
}
return mySettingsPanels.get(name);
}
Aggregations