use of com.intellij.application.options.TabbedLanguageCodeStylePanel in project intellij-community by JetBrains.
the class YAMLCodeStyleSettingsProvider method createSettingsPage.
@NotNull
@Override
public Configurable createSettingsPage(final CodeStyleSettings settings, final CodeStyleSettings originalSettings) {
return new CodeStyleAbstractConfigurable(settings, originalSettings, YAMLLanguage.INSTANCE.getDisplayName()) {
@Override
protected CodeStyleAbstractPanel createPanel(final CodeStyleSettings settings) {
final CodeStyleSettings currentSettings = getCurrentSettings();
final CodeStyleSettings settings1 = settings;
return new TabbedLanguageCodeStylePanel(YAMLLanguage.INSTANCE, currentSettings, settings1) {
@Override
protected void initTabs(final CodeStyleSettings settings) {
addIndentOptionsTab(settings);
}
};
}
@Override
public String getHelpTopic() {
return "reference.settingsdialog.codestyle.yaml";
}
};
}
use of com.intellij.application.options.TabbedLanguageCodeStylePanel 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);
}
use of com.intellij.application.options.TabbedLanguageCodeStylePanel in project intellij-community by JetBrains.
the class JsonCodeStyleSettingsProvider method createSettingsPage.
@NotNull
@Override
public Configurable createSettingsPage(CodeStyleSettings settings, CodeStyleSettings originalSettings) {
return new CodeStyleAbstractConfigurable(settings, originalSettings, "JSON") {
@Override
protected CodeStyleAbstractPanel createPanel(CodeStyleSettings settings) {
final Language language = JsonLanguage.INSTANCE;
final CodeStyleSettings currentSettings = getCurrentSettings();
return new TabbedLanguageCodeStylePanel(language, currentSettings, settings) {
@Override
protected void initTabs(CodeStyleSettings settings) {
addIndentOptionsTab(settings);
addSpacesTab(settings);
addBlankLinesTab(settings);
addWrappingAndBracesTab(settings);
addTab(new JsonCodeStylePanel(settings));
}
};
}
@Nullable
@Override
public String getHelpTopic() {
return "reference.settingsdialog.codestyle.json";
}
};
}
Aggregations