void (@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); Editor editor = CommonDataKeys.EDITOR.getData(dataContext); Project project = CommonDataKeys.PROJECT.getData(dataContext); List<PsiElement> elements = getPsiElements(dataContext, editor); String copy = getQualifiedName(editor, elements); if (copy != null) { CopyPasteManager.getInstance().setContents(new CopyReferenceFQNTransferable(copy)); setStatusBarText(project, IdeBundle.message("message.reference.to.fqn.has.been.copied", copy)); } else if (editor != null && project != null) { Document document = editor.getDocument(); PsiFile file = PsiDocumentManager.getInstance(project).getCachedPsiFile(document); if (file != null) { String toCopy = getFileFqn(file) + ":" + (editor.getCaretModel().getLogicalPosition().line + 1); CopyPasteManager.getInstance().setContents(new StringSelection(toCopy)); setStatusBarText(project, LangBundle.message("status.bar.text.reference.has.been.copied", toCopy)); } return; } highlight(editor, project, elements); }