@Nullable
  static Editor getEditor(AnActionEvent event) {
    @Nullable FileEditor editor = event.getData(PlatformDataKeys.LAST_ACTIVE_FILE_EDITOR);
    return editor instanceof TextEditor ? ((TextEditor)editor).getEditor() : null;
  }
@Nullable
  static Editor getEditor(AnActionEvent event)