1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-06 07:45:50 +02:00

Improvment of the file search algorithm.

This commit is contained in:
Mikhail Khodjaiants 2002-09-26 16:13:41 +00:00
parent 2d183e519d
commit 5f067307eb

View file

@ -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 )