com.intellij.openapi.editor.ex.EditorSettingsExternalizable Java Examples

The following examples show how to use com.intellij.openapi.editor.ex.EditorSettingsExternalizable. 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: BreadcrumbsInitializingActivity.java    From consulo with Apache License 2.0 6 votes vote down vote up
private static void reinitBreadcrumbsComponent(@Nonnull final FileEditorManager fileEditorManager, @Nonnull VirtualFile file) {
  boolean above = EditorSettingsExternalizable.getInstance().isBreadcrumbsAbove();
  for (FileEditor fileEditor : fileEditorManager.getAllEditors(file)) {
    if (fileEditor instanceof TextEditor) {
      TextEditor textEditor = (TextEditor)fileEditor;
      Editor editor = textEditor.getEditor();
      BreadcrumbsWrapper wrapper = BreadcrumbsWrapper.getBreadcrumbsComponent(editor);
      if (isSuitable(textEditor, file)) {
        if (wrapper != null) {
          if (wrapper.breadcrumbs.above != above) {
            remove(fileEditorManager, fileEditor, wrapper);
            wrapper.breadcrumbs.above = above;
            add(fileEditorManager, fileEditor, wrapper);
          }
          wrapper.queueUpdate();
        }
        else {
          registerWrapper(fileEditorManager, fileEditor, new BreadcrumbsWrapper(editor));
        }
      }
      else if (wrapper != null) {
        disposeWrapper(fileEditorManager, fileEditor, wrapper);
      }
    }
  }
}
 
Example #2
Source File: BreadcrumbsUtilEx.java    From consulo with Apache License 2.0 6 votes vote down vote up
@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 #3
Source File: EditorAppearanceConfigurable.java    From consulo with Apache License 2.0 6 votes vote down vote up
@RequiredUIAccess
@Override
public void apply() throws ConfigurationException {
  EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance();
  editorSettings.setBlinkCaret(myCbBlinkCaret.isSelected());
  try {
    editorSettings.setBlinkPeriod(Integer.parseInt(myBlinkIntervalField.getText()));
  }
  catch (NumberFormatException ignored) {
  }

  editorSettings.setBlockCursor(myCbBlockCursor.isSelected());
  editorSettings.setRightMarginShown(myCbRightMargin.isSelected());
  editorSettings.setLineNumbersShown(myCbShowLineNumbers.isSelected());
  editorSettings.setWhitespacesShown(myCbShowWhitespaces.isSelected());
  editorSettings.setIndentGuidesShown(myShowVerticalIndentGuidesCheckBox.isSelected());

  EditorGeneralConfigurable.reinitAllEditors();

  DaemonCodeAnalyzerSettings.getInstance().SHOW_METHOD_SEPARATORS = myCbShowMethodSeparators.isSelected();

  EditorGeneralConfigurable.restartDaemons();

  applyNameHintsSettings();
  super.apply();
}
 
Example #4
Source File: EditorAppearanceConfigurable.java    From consulo with Apache License 2.0 6 votes vote down vote up
@RequiredUIAccess
@Override
public void reset() {
  EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance();

  myCbShowMethodSeparators.setSelected(DaemonCodeAnalyzerSettings.getInstance().SHOW_METHOD_SEPARATORS);
  myCbBlinkCaret.setSelected(editorSettings.isBlinkCaret());
  myBlinkIntervalField.setText(Integer.toString(editorSettings.getBlinkPeriod()));
  myBlinkIntervalField.setEnabled(editorSettings.isBlinkCaret());
  myCbRightMargin.setSelected(editorSettings.isRightMarginShown());
  myCbShowLineNumbers.setSelected(editorSettings.isLineNumbersShown());
  myCbBlockCursor.setSelected(editorSettings.isBlockCursor());
  myCbShowWhitespaces.setSelected(editorSettings.isWhitespacesShown());
  myShowVerticalIndentGuidesCheckBox.setSelected(editorSettings.isIndentGuidesShown());

  myShowParameterNameHints.setSelected(editorSettings.isShowParameterNameHints());

  super.reset();
}
 
Example #5
Source File: EditorSmartKeysConfigurable.java    From consulo with Apache License 2.0 6 votes vote down vote up
@RequiredUIAccess
@Override
protected void reset(@Nonnull Panel panel) {
  EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance();
  CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();

  panel.myReformatOnPasteCombo.setValue(codeInsightSettings.REFORMAT_ON_PASTE);

  panel.myCbSmartHome.setValue(editorSettings.isSmartHome());
  panel.myCbSmartEnd.setValue(codeInsightSettings.SMART_END_ACTION);

  panel.myCbSmartIndentOnEnter.setValue(codeInsightSettings.SMART_INDENT_ON_ENTER);
  panel.myCbInsertPairCurlyBraceOnEnter.setValue(codeInsightSettings.INSERT_BRACE_ON_ENTER);
  panel.myCbInsertJavadocStubOnEnter.setValue(codeInsightSettings.JAVADOC_STUB_ON_ENTER);

  panel.myCbInsertPairBracket.setValue(codeInsightSettings.AUTOINSERT_PAIR_BRACKET);
  panel.mySmartIndentPastedLinesCheckBox.setValue(codeInsightSettings.INDENT_TO_CARET_ON_PASTE);
  panel.myCbInsertPairQuote.setValue(codeInsightSettings.AUTOINSERT_PAIR_QUOTE);
  panel.myCbReformatBlockOnTypingRBrace.setValue(codeInsightSettings.REFORMAT_BLOCK_ON_RBRACE);
  panel.myCbCamelWords.setValue(editorSettings.isCamelWords());

  panel.myCbSurroundSelectionOnTyping.setValue(codeInsightSettings.SURROUND_SELECTION_ON_QUOTE_TYPED);

  panel.myCbIndentingBackspace.setValue(codeInsightSettings.getBackspaceMode());
}
 
Example #6
Source File: EditorSmartKeysConfigurable.java    From consulo with Apache License 2.0 6 votes vote down vote up
@RequiredUIAccess
@Override
protected void apply(@Nonnull Panel panel) throws ConfigurationException {
  EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance();
  CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();

  editorSettings.setSmartHome(panel.myCbSmartHome.getValue());
  codeInsightSettings.SMART_END_ACTION = panel.myCbSmartEnd.getValue();
  codeInsightSettings.SMART_INDENT_ON_ENTER = panel.myCbSmartIndentOnEnter.getValue();
  codeInsightSettings.INSERT_BRACE_ON_ENTER = panel.myCbInsertPairCurlyBraceOnEnter.getValue();
  codeInsightSettings.INDENT_TO_CARET_ON_PASTE = panel.mySmartIndentPastedLinesCheckBox.getValue();
  codeInsightSettings.JAVADOC_STUB_ON_ENTER = panel.myCbInsertJavadocStubOnEnter.getValue();
  codeInsightSettings.AUTOINSERT_PAIR_BRACKET = panel.myCbInsertPairBracket.getValue();
  codeInsightSettings.AUTOINSERT_PAIR_QUOTE = panel.myCbInsertPairQuote.getValue();
  codeInsightSettings.REFORMAT_BLOCK_ON_RBRACE = panel.myCbReformatBlockOnTypingRBrace.getValue();
  codeInsightSettings.SURROUND_SELECTION_ON_QUOTE_TYPED = panel.myCbSurroundSelectionOnTyping.getValue();
  editorSettings.setCamelWords(panel.myCbCamelWords.getValue());
  codeInsightSettings.REFORMAT_ON_PASTE = panel.myReformatOnPasteCombo.getValue();
  codeInsightSettings.setBackspaceMode(panel.myCbIndentingBackspace.getValue());
}
 
Example #7
Source File: AbstractToggleUseSoftWrapsAction.java    From consulo with Apache License 2.0 6 votes vote down vote up
public static void toggleSoftWraps(@Nonnull Editor editor, @Nullable SoftWrapAppliancePlaces places, boolean state) {
  Point point = editor.getScrollingModel().getVisibleArea().getLocation();
  LogicalPosition anchorPosition = editor.xyToLogicalPosition(point);
  int intraLineShift = point.y - editor.logicalPositionToXY(anchorPosition).y;

  if (places != null) {
    EditorSettingsExternalizable.getInstance().setUseSoftWraps(state, places);
    EditorFactory.getInstance().refreshAllEditors();
  }
  if (editor.getSettings().isUseSoftWraps() != state) {
    editor.getSettings().setUseSoftWraps(state);
  }

  editor.getScrollingModel().disableAnimation();
  editor.getScrollingModel().scrollVertically(editor.logicalPositionToXY(anchorPosition).y + intraLineShift);
  editor.getScrollingModel().enableAnimation();
}
 
Example #8
Source File: DesktopEditorAnalyzeStatusPanel.java    From consulo with Apache License 2.0 6 votes vote down vote up
private void changeStatus(AnalyzerStatus newStatus) {
  boolean resetAnalyzingStatus = analyzerStatus != null && analyzerStatus.isTextStatus() && analyzerStatus.getAnalyzingType() == AnalyzingType.COMPLETE;
  analyzerStatus = newStatus;
  //smallIconLabel.setIcon(analyzerStatus.getIcon());

  if (showToolbar != analyzerStatus.getController().enableToolbar()) {
    showToolbar = EditorSettingsExternalizable.getInstance().isShowInspectionWidget() && analyzerStatus.getController().enableToolbar();
    updateTrafficLightVisibility();
  }

  boolean analyzing = analyzerStatus.getAnalyzingType() != AnalyzingType.COMPLETE;
  hasAnalyzed = !resetAnalyzingStatus && (hasAnalyzed || (isAnalyzing && !analyzing));
  isAnalyzing = analyzing;

  if (analyzerStatus.getAnalyzingType() != AnalyzingType.EMPTY) {
    showNavigation = analyzerStatus.isShowNavigation();
  }

  myPopupManager.updateVisiblePopup();
  ActivityTracker.getInstance().inc();
}
 
Example #9
Source File: EditorView.java    From consulo with Apache License 2.0 6 votes vote down vote up
public void reinitSettings() {
  assertIsDispatchThread();
  synchronized (myLock) {
    myPlainSpaceWidth = -1;
    myTabSize = -1;
    setFontRenderContext(null);
  }
  switch (EditorSettingsExternalizable.getInstance().getBidiTextDirection()) {
    case LTR:
      myBidiFlags = Bidi.DIRECTION_LEFT_TO_RIGHT;
      break;
    case RTL:
      myBidiFlags = Bidi.DIRECTION_RIGHT_TO_LEFT;
      break;
    default:
      myBidiFlags = Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT;
  }
  myLogicalPositionCache.reset(false);
  myTextLayoutCache.resetToDocumentSize(false);
  invalidateFoldRegionLayouts();
  myCharWidthCache.clear();
  setPrefix(myPrefixText, myPrefixAttributes); // recreate prefix layout
  mySizeManager.reset();
}
 
Example #10
Source File: GutterIconsConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@RequiredUIAccess
@Override
public void apply() throws ConfigurationException {
  EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance();
  if (myShowGutterIconsJBCheckBox.isSelected() != editorSettings.areGutterIconsShown()) {
    editorSettings.setGutterIconsShown(myShowGutterIconsJBCheckBox.isSelected());
    EditorGeneralConfigurable.reinitAllEditors();
  }
  for (GutterIconDescriptor descriptor : myDescriptors) {
    LineMarkerSettings.getInstance().setEnabled(descriptor, myList.isItemSelected(descriptor));
  }
  for (Project project : ProjectManager.getInstance().getOpenProjects()) {
    DaemonCodeAnalyzer.getInstance(project).restart();
  }
}
 
Example #11
Source File: FlutterConsoleLogManager.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Set our preferred settings for the run console.
 */
public static void initConsolePreferences() {
  final PropertiesComponent properties = PropertiesComponent.getInstance();
  if (!properties.getBoolean(consolePreferencesSetKey)) {
    properties.setValue(consolePreferencesSetKey, true);

    // Set our preferred default settings for console text wrapping.
    final EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance();
    editorSettings.setUseSoftWraps(true, SoftWrapAppliancePlaces.CONSOLE);
  }
}
 
Example #12
Source File: FlutterConsoleLogManager.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Set our preferred settings for the run console.
 */
public static void initConsolePreferences() {
  final PropertiesComponent properties = PropertiesComponent.getInstance();
  if (!properties.getBoolean(consolePreferencesSetKey)) {
    properties.setValue(consolePreferencesSetKey, true);

    // Set our preferred default settings for console text wrapping.
    final EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance();
    editorSettings.setUseSoftWraps(true, SoftWrapAppliancePlaces.CONSOLE);
  }
}
 
Example #13
Source File: DesktopEditorErrorPanel.java    From consulo with Apache License 2.0 5 votes vote down vote up
public DesktopEditorErrorPanel(DesktopEditorImpl editor, DesktopEditorAnalyzeStatusPanel statusPanel, DesktopEditorMarkupModelImpl markupModel) {
  myEditor = editor;
  myStatusPanel = statusPanel;
  myStatusPanel.setErrorPanel(this);
  myMarkupModel = markupModel;
  mySmallIconVisible = !EditorSettingsExternalizable.getInstance().isShowInspectionWidget();

  updateUI();

  uiSettingsChanged(UISettings.getInstance());
}
 
Example #14
Source File: BreadcrumbsConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void apply() {
  boolean modified = false;
  EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance();
  if (settings.setBreadcrumbsAbove(isBreadcrumbsAbove())) modified = true;
  if (settings.setBreadcrumbsShown(isBreadcrumbsShown())) modified = true;
  for (Entry<String, JCheckBox> entry : map.entrySet()) {
    if (settings.setBreadcrumbsShownFor(entry.getKey(), entry.getValue().isSelected())) modified = true;
  }
  if (modified) UISettings.getInstance().fireUISettingsChanged();
}
 
Example #15
Source File: ToggleUseSoftWrapsInPreviewAction.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isSelected(AnActionEvent e) {
  Editor editor = getEditor(e);
  return editor == null
         ? EditorSettingsExternalizable.getInstance().isUseSoftWraps(SoftWrapAppliancePlaces.PREVIEW)
         : editor.getSettings().isUseSoftWraps();
}
 
Example #16
Source File: BreadcrumbsConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #17
Source File: SetEditorBidiTextDirectionAction.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void setSelected(AnActionEvent e, boolean state) {
  if (myDirection != EditorSettingsExternalizable.getInstance().getBidiTextDirection()) {
    EditorSettingsExternalizable.getInstance().setBidiTextDirection(myDirection);
    EditorFactory.getInstance().refreshAllEditors();
  }
}
 
Example #18
Source File: BreadcrumbsConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void reset() {
  EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance();
  setBreadcrumbsAbove(settings.isBreadcrumbsAbove());
  setBreadcrumbsShown(settings.isBreadcrumbsShown());
  for (Entry<String, JCheckBox> entry : map.entrySet()) {
    entry.getValue().setSelected(settings.isBreadcrumbsShownFor(entry.getKey()));
  }
  updateEnabled();
}
 
Example #19
Source File: TrailingSpacesStripper.java    From consulo with Apache License 2.0 5 votes vote down vote up
public void clearLineModificationFlags(@Nonnull Document document) {
  if (document instanceof DocumentWindow) {
    document = ((DocumentWindow)document).getDelegate();
  }
  if (!(document instanceof DocumentImpl)) {
    return;
  }

  Editor activeEditor = getActiveEditor(document);

  // when virtual space enabled, we can strip whitespace anywhere
  boolean isVirtualSpaceEnabled = activeEditor == null || activeEditor.getSettings().isVirtualSpace();

  final EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance();
  if (settings == null) return;

  boolean enabled = !Boolean.TRUE.equals(DISABLE_FOR_FILE_KEY.get(FileDocumentManager.getInstance().getFile(document)));
  if (!enabled) return;
  String stripTrailingSpaces = settings.getStripTrailingSpaces();
  final boolean doStrip = !stripTrailingSpaces.equals(EditorSettingsExternalizable.STRIP_TRAILING_SPACES_NONE);
  final boolean inChangedLinesOnly = !stripTrailingSpaces.equals(EditorSettingsExternalizable.STRIP_TRAILING_SPACES_WHOLE);

  int[] caretLines;
  if (activeEditor != null && inChangedLinesOnly && doStrip && !isVirtualSpaceEnabled) {
    List<Caret> carets = activeEditor.getCaretModel().getAllCarets();
    caretLines = new int[carets.size()];
    for (int i = 0; i < carets.size(); i++) {
      Caret caret = carets.get(i);
      caretLines[i] = caret.getLogicalPosition().line;
    }
  }
  else {
    caretLines = ArrayUtil.EMPTY_INT_ARRAY;
  }
  ((DocumentImpl)document).clearLineModificationFlagsExcept(caretLines);
}
 
Example #20
Source File: BreadcrumbsUtilEx.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static String findLanguageWithBreadcrumbSettings(Language language) {
  EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance();
  Language base = language;
  while (base != null) {
    if (settings.hasBreadcrumbSettings(base.getID())) {
      return base.getID();
    }
    base = base.getBaseLanguage();
  }
  return language.getID();
}
 
Example #21
Source File: ToggleBreadcrumbsAction.java    From consulo with Apache License 2.0 5 votes vote down vote up
@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 #22
Source File: DocumentationComponent.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
protected void processMouseWheelEvent(MouseWheelEvent e) {
  if (!EditorSettingsExternalizable.getInstance().isWheelFontChangeEnabled() || !EditorUtil.isChangeFontSize(e)) {
    super.processMouseWheelEvent(e);
    return;
  }

  int rotation = e.getWheelRotation();
  if (rotation == 0) return;
  int change = Math.abs(rotation);
  boolean increase = rotation <= 0;
  FontSize newFontSize = getQuickDocFontSize();
  for (; change > 0; change--) {
    if (increase) {
      newFontSize = newFontSize.larger();
    }
    else {
      newFontSize = newFontSize.smaller();
    }
  }

  if (newFontSize == getQuickDocFontSize()) {
    return;
  }

  setQuickDocFontSize(newFontSize);
  applyFontProps();
  setFontSizeSliderSize(newFontSize);
}
 
Example #23
Source File: FileInEditorProcessor.java    From consulo with Apache License 2.0 5 votes vote down vote up
private boolean shouldNotify() {
  Application application = ApplicationManager.getApplication();
  if (application.isUnitTestMode() || application.isHeadlessEnvironment()) {
    return false;
  }
  EditorSettingsExternalizable.OptionSet editorOptions = EditorSettingsExternalizable.getInstance().getOptions();
  return editorOptions.SHOW_NOTIFICATION_AFTER_REFORMAT_CODE_ACTION && myEditor != null && !myProcessSelectedText;
}
 
Example #24
Source File: CodeFoldingConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@RequiredUIAccess
@Nonnull
@Override
protected Component createLayout(PropertyBuilder propertyBuilder) {
  VerticalLayout verticalLayout = VerticalLayout.create();

  CheckBox outlineBox = CheckBox.create(ApplicationBundle.message("checkbox.show.code.folding.outline"));
  verticalLayout.add(outlineBox);
  EditorSettingsExternalizable externalizable = EditorSettingsExternalizable.getInstance();
  propertyBuilder.add(outlineBox, externalizable::isFoldingOutlineShown, externalizable::setFoldingOutlineShown);
  return verticalLayout;
}
 
Example #25
Source File: GutterIconsConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@RequiredUIAccess
@Override
public void reset() {
  for (GutterIconDescriptor descriptor : myDescriptors) {
    myList.setItemSelected(descriptor, LineMarkerSettings.getInstance().isEnabled(descriptor));
  }
  boolean gutterIconsShown = EditorSettingsExternalizable.getInstance().areGutterIconsShown();
  myShowGutterIconsJBCheckBox.setSelected(gutterIconsShown);
  myList.setEnabled(gutterIconsShown);
}
 
Example #26
Source File: GutterIconsConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@RequiredUIAccess
@Override
public boolean isModified() {
  for (GutterIconDescriptor descriptor : myDescriptors) {
    if (myList.isItemSelected(descriptor) != LineMarkerSettings.getInstance().isEnabled(descriptor)) {
      return true;
    }
  }
  return myShowGutterIconsJBCheckBox.isSelected() != EditorSettingsExternalizable.getInstance().areGutterIconsShown();
}
 
Example #27
Source File: EditorOptionsTopHitProvider.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isOptionEnabled() {
  return !EditorSettingsExternalizable.getInstance().isAllSoftWrapsShown();
}
 
Example #28
Source File: SettingsImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public int getCustomSoftWrapIndent() {
  return myCustomSoftWrapIndent == null ? EditorSettingsExternalizable.getInstance().getCustomSoftWrapIndent() : myCustomSoftWrapIndent;
}
 
Example #29
Source File: EditorOptionsTopHitProvider.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void setOptionState(boolean enabled) {
  EditorSettingsExternalizable.getInstance().setAllSoftwrapsShown(!enabled);
  fireUpdated();
}
 
Example #30
Source File: SettingsImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isShowIntentionBulb() {
  return myShowIntentionBulb == null ? EditorSettingsExternalizable.getInstance().isShowIntentionBulb() : myShowIntentionBulb;
}