mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 05:15:43 +02:00
Check if project exists when generating the source locations.
This commit is contained in:
parent
77e7c17c2c
commit
cd7c06c7d3
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-01-06 Mikhail Khodjaiants
|
||||||
|
Check if project exists when generating the source locations.
|
||||||
|
* CSourceLocator.java
|
||||||
|
|
||||||
2003-01-06 Alain Magloire
|
2003-01-06 Alain Magloire
|
||||||
|
|
||||||
* src/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointManager.java (createLocation):
|
* src/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointManager.java (createLocation):
|
||||||
|
|
|
@ -170,7 +170,7 @@ public class CSourceLocator implements ICSourceLocator
|
||||||
public static ICSourceLocation[] getDefaultSourceLocations( IProject project )
|
public static ICSourceLocation[] getDefaultSourceLocations( IProject project )
|
||||||
{
|
{
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
if ( project != null )
|
if ( project != null && project.exists() )
|
||||||
{
|
{
|
||||||
list.add( new CProjectSourceLocation( project ) );
|
list.add( new CProjectSourceLocation( project ) );
|
||||||
addReferencedSourceLocations( list, project );
|
addReferencedSourceLocations( list, project );
|
||||||
|
@ -186,11 +186,14 @@ public class CSourceLocator implements ICSourceLocator
|
||||||
{
|
{
|
||||||
IProject[] projects = project.getReferencedProjects();
|
IProject[] projects = project.getReferencedProjects();
|
||||||
for ( int i = 0; i < projects.length; i++ )
|
for ( int i = 0; i < projects.length; i++ )
|
||||||
|
{
|
||||||
|
if ( projects[i].exists() )
|
||||||
{
|
{
|
||||||
list.add( new CProjectSourceLocation( projects[i] ) );
|
list.add( new CProjectSourceLocation( projects[i] ) );
|
||||||
addReferencedSourceLocations( list, projects[i] );
|
addReferencedSourceLocations( list, projects[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch( CoreException e )
|
catch( CoreException e )
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|
Loading…
Add table
Reference in a new issue