boolean (@NotNull Project project, @NotNull DataContext dataContext) { Editor editor = CommonDataKeys.EDITOR.getData(dataContext); if (editor == null) { return false; } PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); if (file == null) { return false; } Language language = PsiUtilBase.getLanguageInEditor(editor, project); if (language == null) { language = file.getLanguage(); } return !(LanguageFindUsages.INSTANCE.forLanguage(language) instanceof EmptyFindUsagesProvider); }