public static void setEditorHighlighter(@Nullable Project project, @NotNull EditorEx editor, @NotNull DocumentContent content) {
    Disposable disposable = ((EditorImpl)editor).getDisposable();
    if (project != null) {
      DiffEditorHighlighterUpdater updater = new DiffEditorHighlighterUpdater(project, disposable, editor, content);
      updater.updateHighlighters();
    }
    else {
      ReadAction
        .nonBlocking(() -> {
          CharSequence text = editor.getDocument().getImmutableCharSequence();
          return initEditorHighlighter(null, content, text);
        })
        .finishOnUiThread(ModalityState.any(), result -> {
          if (result != null) editor.setHighlighter(result);
        })
        .expireWith(disposable)
        .submit(NonUrgentExecutor.getInstance());
    }
  }
public static void setEditorHighlighter(@Nullable Project project, @NotNull EditorEx editor, @NotNull DocumentContent content)