boolean (@NotNull JUnitConfiguration configuration, @NotNull ConfigurationContext context, @NotNull Ref<PsiElement> sourceElement) { PsiPackage psiPackage = AbstractJavaTestConfigurationProducer.checkPackage(context.getPsiLocation()); if (psiPackage == null) return false; sourceElement.set(psiPackage); if (!LocationUtil.isJarAttached(context.getLocation(), psiPackage, JUnitUtil.TEST_CASE_CLASS, JUnitUtil.TEST5_ANNOTATION, JUnitCommonClassNames.ORG_JUNIT_PLATFORM_ENGINE_TEST_ENGINE)) return false; final JUnitConfiguration.Data data = configuration.getPersistentData(); data.PACKAGE_NAME = psiPackage.getQualifiedName(); data.TEST_OBJECT = JUnitConfiguration.TEST_PACKAGE; data.setScope(setupPackageConfiguration(context, configuration, data.getScope())); configuration.setGeneratedName(); return true; }