mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix broken tests.
This commit is contained in:
parent
f922e4880f
commit
8858cc1fd3
2 changed files with 12 additions and 4 deletions
|
@ -577,6 +577,7 @@ public class SourceIndexerTests extends TestCase implements IIndexChangeListener
|
|||
|
||||
public void testExactDeclarations() throws Exception
|
||||
{
|
||||
//TODO Bogdan - you may want to import c.h here a.h includes it! - JC
|
||||
importFile("a.h","resources/dependency/a.h");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
//Make sure project got added to index
|
||||
|
|
|
@ -120,10 +120,17 @@ public class ParserUtil
|
|||
if( root.getLocation().isPrefixOf( path ) )
|
||||
path = path.removeFirstSegments(root.getLocation().segmentCount() );
|
||||
|
||||
IResource resultingResource = root.getFile(path);
|
||||
if( resultingResource != null && resultingResource.exists() )
|
||||
return resultingResource;
|
||||
return null;
|
||||
try
|
||||
{
|
||||
IFile resultingResource = root.getFile(path);
|
||||
if( resultingResource != null && resultingResource.exists() )
|
||||
return resultingResource;
|
||||
return null;
|
||||
}
|
||||
catch( IllegalArgumentException iae ) //thrown on invalid paths
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue