Community
Participate
Working Groups
I made the following changes to open up the file if it is an absolute path reference: 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.27 diff -u -r1.27 CSourceLocator.java --- CSourceLocator.java 18 Jun 2004 22:17:10 -0000 1.27 +++ CSourceLocator.java 1 Nov 2004 23:07:46 -0000 @@ -10,6 +10,7 @@ ***********************************************************************/ package org.eclipse.cdt.debug.internal.core.sourcelookup; +import java.io.File; import java.io.IOException; import java.io.StringReader; import java.text.MessageFormat; @@ -23,6 +24,8 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; + +import org.eclipse.cdt.core.resources.FileStorage; import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.model.ICStackFrame; @@ -40,6 +43,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.model.IPersistableSourceLocator; @@ -143,6 +147,19 @@ list.add( result ); if ( ! searchForDuplicateFiles() ) break; + } + } + + /* if we didn't find any source files, we'll just try to open the + file as an absolute path external file*/ + if (list.isEmpty()) + { + File file; + file=new File(fileName); + if (file.isAbsolute() &&file.exists()) + { + FileStorage t=new FileStorage( new Path(fileName) ); + list.add(t); } } }
Created attachment 15536 [details] Ouch. Pasted patches get word-wrapped. Trying again.
we will consider for cdt-3.0
I'm trying to make my patches to CDT a bit more managable. This change is currently my only modification to org.eclipse.cdt.debug.core. If CVS HEAD is now CDT 3.0, could it be applied in some form or another? Is there anything I can do at this point? Thanks. Øyvind
Fixed.
Seems to work fine without my patch. Thanks!