Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] External source files

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v
retrieving revision 1.73
diff -u -r1.73 ChangeLog
--- ChangeLog 10 Dec 2002 03:46:46 -0000 1.73
+++ ChangeLog 10 Dec 2002 18:23:57 -0000
@@ -1,3 +1,7 @@
+2002-12-10 Mikhail Khodjaiants
+ If the given source file path is absolute and the source locator can not find it in the all specified locations return a FileStorage object.
+ * CSourceLocator.java
+
 2002-12-09 Mikhail Khodjaiants
  Split the detail message of ICDIErrorInfo into tokens and trancate aech token if it is too long.
  * CDebugTarget.java
Index: src/org/eclipse/cdt/debug/internal/core/sourcelookup/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.3
diff -u -r1.3 CSourceLocator.java
--- src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java 2 Dec 2002 23:22:22 -0000 1.3
+++ src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java 10 Dec 2002 18:23:58 -0000
@@ -8,6 +8,7 @@
 
 import java.util.ArrayList;
 
+import org.eclipse.cdt.core.resources.FileStorage;
 import org.eclipse.cdt.debug.core.model.IStackFrameInfo;
 import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
 import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
@@ -15,6 +16,7 @@
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.model.IPersistableSourceLocator;
 import org.eclipse.debug.core.model.IStackFrame;
@@ -99,37 +101,18 @@
       break;
     }
    }
-  }  
-  return result;
- }
-
- /* (non-Javadoc)
-  * @see org.eclipse.cdt.debug.core.ICSourceLocator#getSourceElement(String)
-  */
-/*
- public Object getSourceElement( String fileName )
- {
-  Object result = null;
-  if ( fileName != null && fileName.length() > 0 )
-  {
-   ICSourceLocation[] locations = getSourceLocations();
-   for ( int i = 0; i < locations.length; ++i )
+   if ( result == null )
    {
-    try
-    {
-     result = locations[i].findSourceElement( fileName );
-    }
-    catch( CoreException e )
+    Path path = new Path( fileName );
+    if ( path.isAbsolute() && path.toFile().exists() )
     {
-     // do nothing
+     return new FileStorage( path );
     }
-    if ( result != null )
-     break;
    }
-  }
+  }  
   return result;
  }
-*/
+
  /* (non-Javadoc)
   * @see org.eclipse.cdt.debug.core.ICSourceLocator#contains(IResource)
   */

Back to the top