void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement psiElement = descriptor.getPsiElement(); final PsiFile containingFile = psiElement.getContainingFile(); if (containingFile == null) { return; } final Editor editor = FileEditorManager.getInstance(project).getSelectedTextEditor(); if (editor == null) { return; } final HectorComponent component = project.getService(HectorComponentFactory.class).create(containingFile.getOriginalFile()); component.showComponent(JBPopupFactory.getInstance().guessBestPopupLocation(editor)); }