Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorKen Ryall2008-08-14 11:20:34 -0400
committerKen Ryall2008-08-14 11:20:34 -0400
commita2c9436534a42d26e94dee752766041f4d5cf1dc (patch)
treee3a1f925138d4fe373e803a600ecf923b05cffe5 /debug
parent8c072935e8bbd40719c7cb0113d0b76b37bf0e4b (diff)
downloadorg.eclipse.cdt-a2c9436534a42d26e94dee752766041f4d5cf1dc.tar.gz
org.eclipse.cdt-a2c9436534a42d26e94dee752766041f4d5cf1dc.tar.xz
org.eclipse.cdt-a2c9436534a42d26e94dee752766041f4d5cf1dc.zip
Now reopens when a file is remapped to one already in the workspace.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
index 5c7541c1de..e15c0f7acd 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
@@ -29,6 +29,7 @@ import org.eclipse.cdt.internal.core.model.ExternalTranslationUnit;
import org.eclipse.cdt.internal.ui.util.EditorUtility;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -322,6 +323,12 @@ public class CSourceNotFoundEditor extends CommonSourceNotFoundEditor {
String filePath = tuPath.toOSString();
try {
Object[] foundElements = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector().findSourceElements(filePath);
+ if (foundElements.length == 1 && foundElements[0] instanceof IFile)
+ {
+ EditorUtility.openInEditor(foundElements[0]);
+ return true;
+ }
+ else
if (foundElements.length == 1 && foundElements[0] instanceof LocalFileStorage)
{
LocalFileStorage newLocation = (LocalFileStorage) foundElements[0];

Back to the top