From 5f067307eb95f778780a6325518ce5d985452f1e Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 26 Sep 2002 16:13:41 +0000 Subject: [PATCH] Improvment of the file search algorithm. --- .../cdt/debug/core/sourcelookup/CProjectSourceLocation.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceLocation.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceLocation.java index fb61789b923..272a490c5f1 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceLocation.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceLocation.java @@ -84,7 +84,7 @@ public class CProjectSourceLocation implements ICSourceLocation { return fProject; } - +/* private IFile findFile( IContainer parent, IPath name ) throws CoreException { if ( name.isAbsolute() ) @@ -109,7 +109,7 @@ public class CProjectSourceLocation implements ICSourceLocation } return null; } - +*/ private Object findFileByAbsolutePath( String name ) { IPath path = new Path( name ); @@ -169,7 +169,7 @@ public class CProjectSourceLocation implements ICSourceLocation if ( members[i].getLocation().toOSString().equals( fileName ) ) return members[i]; } - else if ( members[i] instanceof IFolder ) + else if ( members[i] instanceof IFolder && fileName.startsWith( members[i].getLocation().toOSString() ) ) { Object result = findFile( (IContainer)members[i], fileName ); if ( result != null )