void (@NotNull PsiElement element, @NotNull FileEditor fileEditor) { if (fileEditor instanceof TextEditor textEditor) { Editor editor = textEditor.getEditor(); Document document = editor.getDocument(); PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(document); myFindUsagesManager.findUsages(element, psiFile, fileEditor, false, null); } }