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:
parent
2d183e519d
commit
5f067307eb
1 changed files with 3 additions and 3 deletions
|
@ -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 )
|
||||
|
|
Loading…
Add table
Reference in a new issue