Java Code Examples for com.intellij.openapi.editor.ex.EditorSettingsExternalizable#isBreadcrumbsShown()
The following examples show how to use
com.intellij.openapi.editor.ex.EditorSettingsExternalizable#isBreadcrumbsShown() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BreadcrumbsUtilEx.java From consulo with Apache License 2.0 | 6 votes |
@Nullable public static BreadcrumbsProvider findProvider(boolean checkSettings, @Nonnull FileViewProvider viewProvider) { EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance(); if (checkSettings && !settings.isBreadcrumbsShown()) return null; Language baseLang = viewProvider.getBaseLanguage(); if (checkSettings && !isBreadcrumbsShownFor(baseLang)) return null; BreadcrumbsProvider provider = BreadcrumbsUtil.getInfoProvider(baseLang); if (provider == null) { for (Language language : viewProvider.getLanguages()) { if (!checkSettings || isBreadcrumbsShownFor(language)) { provider = BreadcrumbsUtil.getInfoProvider(language); if (provider != null) break; } } } return provider; }
Example 2
Source File: ToggleBreadcrumbsAction.java From consulo with Apache License 2.0 | 5 votes |
@Override public boolean isSelected(@Nonnull AnActionEvent event) { EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance(); boolean shown = settings.isBreadcrumbsShown(); Editor editor = findEditor(event); if (editor == null) return shown; Boolean forcedShown = BreadcrumbsForceShownSettings.getForcedShown(editor); if (forcedShown != null) return forcedShown; if (!shown) return false; String languageID = findLanguageID(event); return languageID == null || settings.isBreadcrumbsShownFor(languageID); }
Example 3
Source File: BreadcrumbsConfigurable.java From consulo with Apache License 2.0 | 5 votes |
@Override public boolean isModified() { EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance(); if (isBreadcrumbsAbove() != settings.isBreadcrumbsAbove()) return true; if (isBreadcrumbsShown() != settings.isBreadcrumbsShown()) return true; for (Entry<String, JCheckBox> entry : map.entrySet()) { if (settings.isBreadcrumbsShownFor(entry.getKey()) != entry.getValue().isSelected()) return true; } return false; }