Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2007-08-03 04:14:33 +0000
committerKen Ryall2007-08-03 04:14:33 +0000
commite39c9dace5dabb1e90244ed67e87b935036e36ce (patch)
tree3a26a6cfc93090e82eb1036bbd89386b44218f4e /debug/org.eclipse.cdt.debug.core
parent27bfb855d6e1b334e74e9e4897d6d20423f2c032 (diff)
downloadorg.eclipse.cdt-e39c9dace5dabb1e90244ed67e87b935036e36ce.tar.gz
org.eclipse.cdt-e39c9dace5dabb1e90244ed67e87b935036e36ce.tar.xz
org.eclipse.cdt-e39c9dace5dabb1e90244ed67e87b935036e36ce.zip
Applied patch to fix 197634.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java
index edcdae1a3a6..a0ec7a6c375 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java
@@ -49,12 +49,14 @@ public class AbsolutePathSourceContainer extends AbstractSourceContainer {
// The file is not already in the workspace so try to create an external translation unit for it.
String projectName = getDirector().getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
- ICProject project = CoreModel.getDefault().getCModel().getCProject(projectName);
- if (project != null)
- {
- IPath path = Path.fromOSString(file.getCanonicalPath());
- String id = CoreModel.getRegistedContentTypeId(project.getProject(), path.lastSegment());
- return new ExternalTranslationUnit[] { new ExternalTranslationUnit(project, new Path(file.getCanonicalPath()), id) };
+ if (projectName != "") {
+ ICProject project = CoreModel.getDefault().getCModel().getCProject(projectName);
+ if (project != null)
+ {
+ IPath path = Path.fromOSString(file.getCanonicalPath());
+ String id = CoreModel.getRegistedContentTypeId(project.getProject(), path.lastSegment());
+ return new ExternalTranslationUnit[] { new ExternalTranslationUnit(project, new Path(file.getCanonicalPath()), id) };
+ }
}
} catch (IOException e) { // ignore if getCanonicalPath throws
} catch (CoreException e) {

Back to the top