void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); PsiFile file = element == null ? null : element.getContainingFile(); if (file != null) { FileEditor editor = FileEditorManager.getInstance(project).getSelectedEditor(file.getVirtualFile()); myAction.invoke(project, editor instanceof TextEditor ? ((TextEditor)editor).getEditor() : null, file); } }