Info (@NotNull PsiElement e) { if (isIdentifier(e)) { PsiElement element = e.getParent(); if (element instanceof PsiClass psiClass) { if (!isTestClass(psiClass)) return null; String url = "java:suite://" + ClassUtil.getJVMClassName(psiClass); TestStateStorage.Record state = TestStateStorage.getInstance(e.getProject()).getState(url); return getInfo(state, true, PsiMethodUtil.findMainInClass(psiClass) != null ? 1 : 0); } if (element instanceof PsiMethod psiMethod) { PsiClass containingClass = PsiTreeUtil.getParentOfType(psiMethod, PsiClass.class); if (!isTestMethod(containingClass, psiMethod)) return null; if (isIgnoredForGradleConfiguration(containingClass, psiMethod)) return null; String url = "java:test://" + ClassUtil.getJVMClassName(containingClass) + "/" + psiMethod.getName(); TestStateStorage.Record state = TestStateStorage.getInstance(e.getProject()).getState(url); return getInfo(state, false, 0); } } return null; }