diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 1c73d511cac..9df667fc593 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,5 +1,5 @@ 2003-03-28 Mikhail Khodjaiants - Use the 'exists' method of the 'IFile' interface instead of using toFile().exists() for IPath. + Use the 'exists' method of the 'IFile' interface instead of using 'toFile().exists()' for 'IPath'. * CDirectorySourceLocation.java * CSourceLocator.java diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java index 26dbb86a086..d1668d7d34b 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java @@ -164,7 +164,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation } // Try for a file in another workspace project IFile f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation( filePath ); - if ( f != null ) + if ( f != null && f.exists() ) { return f; } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java index 555ce838c38..9c09773f252 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java @@ -248,7 +248,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato { // Try for a file in another workspace project IFile f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation( path ); - if ( f != null ) + if ( f != null && f.exists() ) { return f; }