void (Module module, TestClassFilter classFilter, Set<Location<?>> classes, boolean junit5) { JUnitConfiguration.Data data = getConfiguration().getPersistentData(); Project project = getConfiguration().getProject(); for (String className : data.getPatterns()) { final PsiClass psiClass = ReadAction.compute(() -> getTestClass(project, className)); if (psiClass != null) { if (ReadAction.compute(() -> JUnitUtil.isTestClass(psiClass))) { classes.add(findLocation(className, psiClass, PsiLocation.fromPsiElement(psiClass))); } } else if (junit5 && className.contains("$")) { //OuterClass$InnerInSuper String topLevelClassName = StringUtil.getPackageName(className, '$'); String nestedClassName = StringUtil.getShortName(className, '$'); PsiClass cl = ReadAction.compute(() -> getTestClass(project, topLevelClassName)); if (cl != null && ReadAction.compute(() -> JUnitUtil.isJUnit5TestClass(cl, false))) { PsiClass innerClassByName = cl.findInnerClassByName(nestedClassName.contains(",") ? StringUtil.getPackageName(nestedClassName, ',') : nestedClassName, true); if (innerClassByName != null) { classes.add(findLocation(nestedClassName, innerClassByName, NestedClassLocation.elementInClass(innerClassByName, cl))); } } } else { classes.clear(); if (!junit5) {//junit 5 process tests automatically LinkedHashSet<PsiClass> psiClasses = new LinkedHashSet<>(); ConfigurationUtil.findAllTestClasses(classFilter, module, psiClasses); psiClasses.stream().map(PsiLocation::fromPsiElement).forEach(classes::add); } return; } } }