use of com.intellij.execution.configurations.ModuleRunProfile in project intellij-community by JetBrains.
the class TestConsoleProperties method initScope.
@NotNull
protected GlobalSearchScope initScope() {
RunProfile configuration = getConfiguration();
if (!(configuration instanceof ModuleRunProfile)) {
return GlobalSearchScope.allScope(myProject);
}
Module[] modules = ((ModuleRunProfile) configuration).getModules();
if (modules.length == 0) {
return GlobalSearchScope.allScope(myProject);
}
GlobalSearchScope scope = GlobalSearchScope.EMPTY_SCOPE;
for (Module each : modules) {
scope = scope.uniteWith(GlobalSearchScope.moduleRuntimeScope(each, true));
}
return scope;
}
use of com.intellij.execution.configurations.ModuleRunProfile in project android by JetBrains.
the class AndroidTestConsoleProperties method initScope.
@NotNull
@Override
protected GlobalSearchScope initScope() {
GlobalSearchScope scope = super.initScope();
Module[] modules = ((ModuleRunProfile) getConfiguration()).getModules();
for (Module each : modules) {
// UnitTest scope in each module is excluded from the scope used to find JUnitTests
TestArtifactSearchScopes testArtifactSearchScopes = TestArtifactSearchScopes.get(each);
if (testArtifactSearchScopes != null) {
scope = scope.intersectWith(GlobalSearchScope.notScope(testArtifactSearchScopes.getUnitTestSourceScope()));
}
}
return scope;
}
Aggregations