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); }
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); }