@Nullable
  private static PsiElement getOriginalElement(@NotNull DataContext dataContext, @Nullable Editor editor) {
    PsiFile file = CommonDataKeys.PSI_FILE.getData(dataContext);
    return (file != null && editor != null) ? file.findElementAt(editor.getCaretModel().getOffset())
                                            : null;
  }
@Nullable
  private static PsiElement getOriginalElement(@NotNull DataContext dataContext, @Nullable Editor editor)