void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { Editor editor; if (requiresEditor) { final DataContext dataContext = DataManager.getInstance().getDataContext(); editor = CommonDataKeys.EDITOR.getData(dataContext); if (editor == null) { if ((editor = FileEditorManager.getInstance(project).getSelectedTextEditor()) == null) { return; } } } else { editor = null; } final PsiFile psiFile = descriptor.getPsiElement().getContainingFile(); if (!isAvailable(project, editor, psiFile)) { return; } invoke(project, editor, psiFile); }