private synchronized void registerOrDisposeHighlighter(RangeHighlighter highlighter) {
    var highlighters = getOrCreateHighlighters(false);
    if (highlighters == null) {
      ApplicationManager.getApplication().invokeLater(() -> highlighter.dispose());
    }
    else {
      highlighters.add(highlighter);
    }
  }
private synchronized void registerOrDisposeHighlighter(RangeHighlighter highlighter)