PsiClass (@NotNull DataContext context) { PsiElement element = context.getData(CommonDataKeys.PSI_ELEMENT); UClass uClass = UastContextKt.getUastParentOfType(element, UClass.class); if (uClass == null) return null; final UAnnotation annotation = UastContextKt.toUElement(AnnotationUtil.findAnnotationInHierarchy(uClass.getJavaPsi(), Collections.singleton(JUnitUtil.RUN_WITH)), UAnnotation.class); if (annotation == null) return null; UExpression value = annotation.findAttributeValue("value"); if (!(value instanceof UClassLiteralExpression classLiteralExpression)) return null; PsiType type = classLiteralExpression.getType(); return type != null && type.equalsToText(TestFrameworkConstants.PARAMETERIZED_ANNOTATION_QUALIFIED_NAME) ? uClass.getJavaPsi() : null; }