Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java18
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java2
2 files changed, 10 insertions, 10 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java
index 2f85324855..ea6e02f5ce 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java
@@ -89,16 +89,16 @@ public class CProjectSourceContainer extends CompositeSourceContainer {
super.init(director);
if (fProject == null && director != null) {
fProject = SourceUtils.getLaunchConfigurationProject(director);
- if (fProject != null) {
- fRootURI = fProject.getLocationURI();
- if (fRootURI == null)
- return;
- try {
- fRootFile = EFS.getStore(fRootURI);
- } catch (CoreException e) {
- }
- fRoot = ResourcesPlugin.getWorkspace().getRoot();
+ }
+ if (fProject != null) {
+ fRootURI = fProject.getLocationURI();
+ if (fRootURI == null)
+ return;
+ try {
+ fRootFile = EFS.getStore(fRootURI);
+ } catch (CoreException e) {
}
+ fRoot = ResourcesPlugin.getWorkspace().getRoot();
}
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java
index 7b03ffade3..862fa2617b 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java
@@ -73,7 +73,7 @@ public class SourceFoldersRelativePathSourceContainer extends CompositeSourceCon
@Override
public void init(ISourceLookupDirector director) {
super.init(director);
- if (director != null) {
+ if (fProject == null && director != null) {
fProject = SourceUtils.getLaunchConfigurationProject(director);
}
}

Back to the top