private static boolean checkEditor(@Nullable Editor editor) {
    //don't need to highlight occurrences in the intention preview editor
    return editor != null && !editor.isViewer();
  }
private static boolean checkEditor(@Nullable Editor editor)