private static boolean isPlainTextFile(@NotNull Editor editor) {
    return editor.getProject() != null && PlainTextLanguage.INSTANCE.is(getLanguageInEditor(editor, editor.getProject()));
  }
private static boolean isPlainTextFile(@NotNull Editor editor)