T (@NotNull PsiFile file, @NotNull SelectionModel selectionModel) { final int selectionStart = selectionModel.getSelectionStart(); final int selectionEnd = selectionModel.getSelectionEnd(); return PsiTreeUtil.findElementOfClassAtRange(file, selectionStart, selectionEnd, myClass); }