Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-11-23 17:39:34 +0000
committereutarass2010-11-23 17:39:34 +0000
commit7ca5f8c9921d41c878d63d243d9af8cccac55542 (patch)
tree32bc2684cc5537c4182450ba1913fd8f1e6bc9f2 /plugins
parent127b376233de6b9eac43c7d6c9e77189f2c8d62e (diff)
downloadorg.eclipse.tcf-7ca5f8c9921d41c878d63d243d9af8cccac55542.tar.gz
org.eclipse.tcf-7ca5f8c9921d41c878d63d243d9af8cccac55542.tar.xz
org.eclipse.tcf-7ca5f8c9921d41c878d63d243d9af8cccac55542.zip
Bug 330919: TCFModelPresentation does not handle LocalFileStorage
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java19
2 files changed, 20 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF
index d0a97fcb6..6c7ab852c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.tm.tcf.debug,
com.jcraft.jsch;bundle-version="0.1.37",
org.eclipse.jsch.core;bundle-version="1.1.100",
- org.eclipse.jsch.ui;bundle-version="1.1.100"
+ org.eclipse.jsch.ui;bundle-version="1.1.100",
+ org.eclipse.core.filesystem;bundle-version="1.3.0"
Import-Package: org.eclipse.core.expressions,
org.eclipse.tm.tcf.core;version="0.3.0",
org.eclipse.tm.tcf.protocol;version="0.3.0",
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java
index f90f04265..392d5b570 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java
@@ -10,12 +10,17 @@
*******************************************************************************/
package org.eclipse.tm.internal.tcf.debug.ui.model;
+import java.net.URI;
import java.util.Collection;
import java.util.HashSet;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.model.ILineBreakpoint;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.debug.ui.IDebugModelPresentation;
@@ -30,6 +35,7 @@ import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.FileStoreEditorInput;
import org.eclipse.ui.part.FileEditorInput;
@@ -113,7 +119,18 @@ public class TCFModelPresentation implements IDebugModelPresentation {
if (element instanceof IFile) {
return new FileEditorInput((IFile)element);
}
- // TODO: files outside workspace (e.g. LocalFileStorage)
+ if (element instanceof IStorage) {
+ IPath fullPath = ((IStorage)element).getFullPath();
+ URI uri = URIUtil.toURI(fullPath);
+ if (uri != null) {
+ try {
+ return new FileStoreEditorInput(EFS.getStore(uri));
+ }
+ catch (CoreException e) {
+ Activator.log(e);
+ }
+ }
+ }
return null;
}
}

Back to the top