public GeneralCodeStylePanel(CodeStyleSettings settings) { super(settings); final List<FileTypeIndentOptionsProvider> indentOptionsProviders = Arrays.asList(Extensions.getExtensions(FileTypeIndentOptionsProvider.EP_NAME)); Collections.sort(indentOptionsProviders, new Comparator<FileTypeIndentOptionsProvider>() { @Override public int compare(FileTypeIndentOptionsProvider p1, FileTypeIndentOptionsProvider p2) { Language lang1 = getLanguage(p1.getFileType()); if (lang1 == null) return -1; Language lang2 = getLanguage(p2.getFileType()); if (lang2 == null) return 1; DisplayPriority priority1 = LanguageCodeStyleSettingsProvider.getDisplayPriority(lang1); DisplayPriority priority2 = LanguageCodeStyleSettingsProvider.getDisplayPriority(lang2); if (priority1.equals(priority2)) { return lang1.getDisplayName().compareTo(lang2.getDisplayName()); } return priority1.compareTo(priority2); } }); myLineSeparatorCombo.addItem(SYSTEM_DEPENDANT_STRING); myLineSeparatorCombo.addItem(UNIX_STRING); myLineSeparatorCombo.addItem(WINDOWS_STRING); myLineSeparatorCombo.addItem(MACINTOSH_STRING); addPanelToWatch(myPanel); myRightMarginSpinner.setModel(new SpinnerNumberModel(settings.RIGHT_MARGIN, 1, 1000000, 1)); myIndentOptionsEditor = new SmartIndentOptionsEditor(); myDefaultIndentOptionsPanel.add(myIndentOptionsEditor.createPanel(), BorderLayout.CENTER); }
@Override public DisplayPriority getPriority() { return DisplayPriority.LANGUAGE_SETTINGS; }
@Override public DisplayPriority getPriority() { return DisplayPriority.CODE_SETTINGS; }
@Override public DisplayPriority getPriority() { return DisplayPriority.KEY_LANGUAGE_SETTINGS; }
@Override public DisplayPriority getPriority() { return DisplayPriority.COMMON_SETTINGS; }
@Override public DisplayPriority getPriority() { return DisplayPriority.OTHER_SETTINGS; }
@NotNull @Override public DisplayPriority getPriority() { return DisplayPriority.COMMON_SETTINGS; }
@Override public DisplayPriority getPriority() { return DisplayPriority.GENERAL_SETTINGS; }
@Override public DisplayPriority getDisplayPriority() { return PlatformUtils.isPyCharm() ? DisplayPriority.KEY_LANGUAGE_SETTINGS : DisplayPriority.LANGUAGE_SETTINGS; }
@Override public DisplayPriority getPriority() { return PlatformUtils.isPyCharm() ? DisplayPriority.KEY_LANGUAGE_SETTINGS : DisplayPriority.LANGUAGE_SETTINGS; }
@Override public DisplayPriority getPriority() { return PlatformUtils.isIdea() ? DisplayPriority.KEY_LANGUAGE_SETTINGS : DisplayPriority.LANGUAGE_SETTINGS; }
@Override public DisplayPriority getDisplayPriority() { if (PlatformUtils.isIdea()) return DisplayPriority.KEY_LANGUAGE_SETTINGS; return DisplayPriority.LANGUAGE_SETTINGS; }