Java 类com.intellij.openapi.editor.ex.util.EmptyEditorHighlighter 实例源码

项目:consulo    文件:EditorImpl.java   
@Override
public void setHighlighter(@Nonnull final EditorHighlighter highlighter) {
  if (isReleased) return; // do not set highlighter to the released editor
  assertIsDispatchThread();
  final Document document = getDocument();
  Disposer.dispose(myHighlighterDisposable);

  document.addDocumentListener(highlighter);
  myHighlighter = highlighter;
  myHighlighterDisposable = () -> document.removeDocumentListener(highlighter);
  Disposer.register(myDisposable, myHighlighterDisposable);
  highlighter.setEditor(this);
  highlighter.setText(document.getImmutableCharSequence());
  if (!(highlighter instanceof EmptyEditorHighlighter)) {
    EditorHighlighterCache.rememberEditorHighlighterForCachesOptimization(document, highlighter);
  }

  if (myPanel != null) {
    reinitSettings();
  }
}
项目:intellij-ce-playground    文件:DiffUtil.java   
@NotNull
public static EditorHighlighter createEmptyEditorHighlighter() {
  return new EmptyEditorHighlighter(EditorColorsManager.getInstance().getGlobalScheme().getAttributes(HighlighterColors.TEXT));
}
项目:consulo    文件:DiffUtil.java   
@Nonnull
private static EditorHighlighter createEmptyEditorHighlighter() {
  return new EmptyEditorHighlighter(EditorColorsManager.getInstance().getGlobalScheme().getAttributes(HighlighterColors.TEXT));
}