boolean (@NotNull Project project, Editor editor, @NotNull PsiElement element) { if (!TestFramework.EXTENSION_NAME.hasAnyExtensions()) return false; final PsiElement parent = element.getParent(); if (!(parent instanceof PsiMethod)) return false; if (!((PsiMethod)parent).hasModifierProperty(PsiModifier.PUBLIC) || ((PsiMethod)parent).hasModifierProperty(PsiModifier.ABSTRACT)) { return false; } PsiClass aClass = PsiTreeUtil.getParentOfType(element, PsiClass.class); return aClass != null && TestFrameworks.detectFramework(aClass) == null; }