mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-87599 - CloudFoundry integration - inherit search scope in debug sessions
This commit is contained in:
@@ -57,12 +57,16 @@ public class DefaultDebugEnvironment implements DebugEnvironment {
|
||||
myRemoteConnection = remoteConnection;
|
||||
myPollConnection = pollConnection;
|
||||
|
||||
mySearchScope = createSearchScope(project, runProfile);
|
||||
}
|
||||
|
||||
public static GlobalSearchScope createSearchScope(Project project, RunProfile runProfile) {
|
||||
Module[] modules = null;
|
||||
if (myRunProfile instanceof ModuleRunProfile) {
|
||||
modules = ((ModuleRunProfile)myRunProfile).getModules();
|
||||
if (runProfile instanceof ModuleRunProfile) {
|
||||
modules = ((ModuleRunProfile)runProfile).getModules();
|
||||
}
|
||||
if (modules == null || modules.length == 0) {
|
||||
mySearchScope = GlobalSearchScope.allScope(project);
|
||||
return GlobalSearchScope.allScope(project);
|
||||
}
|
||||
else {
|
||||
GlobalSearchScope scope = GlobalSearchScope.moduleRuntimeScope(modules[0], true);
|
||||
@@ -70,7 +74,7 @@ public class DefaultDebugEnvironment implements DebugEnvironment {
|
||||
Module module = modules[idx];
|
||||
scope = scope.uniteWith(GlobalSearchScope.moduleRuntimeScope(module, true));
|
||||
}
|
||||
mySearchScope = scope;
|
||||
return scope;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user