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

项目:intellij-ce-playground    文件:RangeMarkerTree.java   
protected RangeMarkerTree(@NotNull Document document) {
  myDocument = document;
  myListener = new PrioritizedInternalDocumentListener() {
    @Override
    public int getPriority() {
      return EditorDocumentPriorities.RANGE_MARKER; // Need to make sure we invalidate all the stuff before someone (like LineStatusTracker) starts to modify highlights.
    }

    @Override
    public void beforeDocumentChange(DocumentEvent event) {}

    @Override
    public void documentChanged(DocumentEvent e) {
      updateMarkersOnChange(e);
    }

    @Override
    public void moveTextHappened(int start, int end, int newBase) {
      reTarget(start, end, newBase);
    }
  };

  document.addDocumentListener(myListener);
}
项目:tools-idea    文件:RangeMarkerTree.java   
protected RangeMarkerTree(@NotNull Document document) {
  myDocument = document;
  myListener = new PrioritizedInternalDocumentListener() {
    @Override
    public int getPriority() {
      return EditorDocumentPriorities.RANGE_MARKER; // Need to make sure we invalidate all the stuff before someone (like LineStatusTracker) starts to modify highlights.
    }

    @Override
    public void beforeDocumentChange(DocumentEvent event) {}

    @Override
    public void documentChanged(DocumentEvent e) {
      updateMarkersOnChange(e);
    }

    @Override
    public void moveTextHappened(int start, int end, int newBase) {
      reTarget(start, end, newBase);
    }
  };

  document.addDocumentListener(myListener);
}
项目:consulo    文件:RangeMarkerTree.java   
protected RangeMarkerTree(@Nonnull Document document) {
  myDocument = document;
  myListener = new PrioritizedInternalDocumentListener() {
    @Override
    public int getPriority() {
      return EditorDocumentPriorities.RANGE_MARKER; // Need to make sure we invalidate all the stuff before someone (like LineStatusTracker) starts to modify highlights.
    }

    @Override
    public void documentChanged(DocumentEvent e) {
      updateMarkersOnChange(e);
    }

    @Override
    public void moveTextHappened(int start, int end, int newBase) {
      reTarget(start, end, newBase);
    }
  };

  document.addDocumentListener(myListener);
}