mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +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;
|
return fProject;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
private IFile findFile( IContainer parent, IPath name ) throws CoreException
|
private IFile findFile( IContainer parent, IPath name ) throws CoreException
|
||||||
{
|
{
|
||||||
if ( name.isAbsolute() )
|
if ( name.isAbsolute() )
|
||||||
|
@ -109,7 +109,7 @@ public class CProjectSourceLocation implements ICSourceLocation
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
private Object findFileByAbsolutePath( String name )
|
private Object findFileByAbsolutePath( String name )
|
||||||
{
|
{
|
||||||
IPath path = new Path( name );
|
IPath path = new Path( name );
|
||||||
|
@ -169,7 +169,7 @@ public class CProjectSourceLocation implements ICSourceLocation
|
||||||
if ( members[i].getLocation().toOSString().equals( fileName ) )
|
if ( members[i].getLocation().toOSString().equals( fileName ) )
|
||||||
return members[i];
|
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 );
|
Object result = findFile( (IContainer)members[i], fileName );
|
||||||
if ( result != null )
|
if ( result != null )
|
||||||
|
|
Loading…
Add table
Reference in a new issue