Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorSergey Prigogin2010-12-19 02:27:45 -0500
committerSergey Prigogin2010-12-19 02:27:45 -0500
commit3e78c7b96229f398369693e287d3b5c0d41c9e68 (patch)
treeb31c35fdd3989d79393eb3e102b8d5530759180d /debug
parentb81cf7e199af69a707d5003bf700de2f14217104 (diff)
downloadorg.eclipse.cdt-3e78c7b96229f398369693e287d3b5c0d41c9e68.tar.gz
org.eclipse.cdt-3e78c7b96229f398369693e287d3b5c0d41c9e68.tar.xz
org.eclipse.cdt-3e78c7b96229f398369693e287d3b5c0d41c9e68.zip
Make CompilationDirectorySourceContainer little smarter.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CompilationDirectorySourceContainer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CompilationDirectorySourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CompilationDirectorySourceContainer.java
index cf14bcba27..13deac25a4 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CompilationDirectorySourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CompilationDirectorySourceContainer.java
@@ -108,7 +108,10 @@ public class CompilationDirectorySourceContainer extends CompositeSourceContaine
* @see org.eclipse.debug.core.sourcelookup.ISourceContainer#findSourceElements(String)
*/
public Object[] findSourceElements(String name) throws CoreException {
- File file = new File(fDirectory, name);
+ File file = new File(name);
+ if (!file.isAbsolute()) {
+ file = new File(fDirectory, name);
+ }
List<Object> sources;
if (file.exists() && file.isFile()) {
sources = Arrays.asList(SourceUtils.findSourceElements(file, getDirector()));

Back to the top