Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Check if project exists when generating the source locations

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v
retrieving revision 1.88
diff -u -r1.88 ChangeLog
--- ChangeLog 6 Jan 2003 16:30:48 -0000 1.88
+++ ChangeLog 6 Jan 2003 19:52:36 -0000
@@ -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
 
  * src/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointManager.java (createLocation):
Index: CSourceLocator.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java,v
retrieving revision 1.6
diff -u -r1.6 CSourceLocator.java
--- CSourceLocator.java 29 Dec 2002 23:55:53 -0000 1.6
+++ CSourceLocator.java 6 Jan 2003 19:53:41 -0000
@@ -170,7 +170,7 @@
  public static ICSourceLocation[] getDefaultSourceLocations( IProject project )
  {
   ArrayList list = new ArrayList();
-  if ( project != null )
+  if ( project != null && project.exists() )
   {
    list.add( new CProjectSourceLocation( project ) );
    addReferencedSourceLocations( list, project );
@@ -187,8 +187,11 @@
     IProject[] projects = project.getReferencedProjects();
     for ( int i = 0; i < projects.length; i++ )
     {
-     list.add( new CProjectSourceLocation( projects[i] ) );
-     addReferencedSourceLocations( list, projects[i] );
+     if (  projects[i].exists() )
+     {
+      list.add( new CProjectSourceLocation( projects[i] ) );
+      addReferencedSourceLocations( list, projects[i] );
+     }
     }
    }
    catch( CoreException e )

Back to the top