mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't check scope for class/method configurations as it is invisible in settings
This commit is contained in:
+12
-2
@@ -40,8 +40,18 @@ public class JUnitConsoleProperties extends JavaAwareTestConsoleProperties<JUnit
|
||||
@NotNull
|
||||
@Override
|
||||
protected GlobalSearchScope initScope() {
|
||||
final SourceScope sourceScope = myConfiguration.getPersistentData().getScope().getSourceScope(myConfiguration);
|
||||
return sourceScope != null ? sourceScope.getGlobalSearchScope() : GlobalSearchScope.allScope(getProject());
|
||||
final JUnitConfiguration.Data persistentData = myConfiguration.getPersistentData();
|
||||
final String testObject = persistentData.TEST_OBJECT;
|
||||
//ignore invisible setting
|
||||
if (JUnitConfiguration.TEST_CATEGORY.equals(testObject) ||
|
||||
JUnitConfiguration.TEST_PATTERN.equals(testObject) ||
|
||||
JUnitConfiguration.TEST_PACKAGE.equals(testObject)) {
|
||||
final SourceScope sourceScope = persistentData.getScope().getSourceScope(myConfiguration);
|
||||
return sourceScope != null ? sourceScope.getGlobalSearchScope() : GlobalSearchScope.allScope(getProject());
|
||||
}
|
||||
else {
|
||||
return super.initScope();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,7 +39,14 @@ public class TestNGConsoleProperties extends JavaAwareTestConsoleProperties<Test
|
||||
@NotNull
|
||||
@Override
|
||||
protected GlobalSearchScope initScope() {
|
||||
return myConfiguration.getPersistantData().getScope().getSourceScope(myConfiguration).getGlobalSearchScope();
|
||||
final String testObject = myConfiguration.getPersistantData().TEST_OBJECT;
|
||||
if (TestType.CLASS.getType().equals(testObject) ||
|
||||
TestType.METHOD.getType().equals(testObject)) {
|
||||
return super.initScope();
|
||||
}
|
||||
else {
|
||||
return myConfiguration.getPersistantData().getScope().getSourceScope(myConfiguration).getGlobalSearchScope();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user