private static @Nullable Editor obtainEditor(@Nullable JComponent c) {
      Component view = c instanceof JViewport ? ((JViewport)c).getView() : c;
      //noinspection CastConflictsWithInstanceof
      return view instanceof EditorComponentImpl ? ((EditorComponentImpl)view).getEditor() :
             view instanceof EditorGutterComponentEx ? CommonDataKeys.EDITOR.getData((DataProvider)view) :
             null;
    }
private static @Nullable Editor obtainEditor(@Nullable JComponent c)