void (@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) { return; } Editor editor = CommonDataKeys.EDITOR.getData(dataContext); PsiElement originalElement = getOriginalElement(dataContext, editor); PsiElement element = getElement(dataContext, editor, originalElement); if (element == null) { Messages.showMessageDialog( project, IdeBundle.message("message.please.select.element.for.javadoc"), IdeBundle.message("title.no.element.selected"), Messages.getErrorIcon() ); return; } showExternalJavadoc(element, originalElement, null, dataContext); }