Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-01-17 20:34:06 +0000
committerDarin Wright2008-01-17 20:34:06 +0000
commit79c2a0944a9347ae3249c34f6414a2703302db7f (patch)
treee72bc8e94ec664bd9b1c39ef18214f58058970c3 /org.eclipse.debug.ui
parent0b6ba3a218029cb6836c75d0dcf5ca4394b41590 (diff)
downloadeclipse.platform.debug-79c2a0944a9347ae3249c34f6414a2703302db7f.tar.gz
eclipse.platform.debug-79c2a0944a9347ae3249c34f6414a2703302db7f.tar.xz
eclipse.platform.debug-79c2a0944a9347ae3249c34f6414a2703302db7f.zip
Bug 210254 - ResourceResolver#translateToValue(...) can't assume that IResource.getLocationURI() is the local path
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceResolver.java8
2 files changed, 7 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
index cd25e51a4..c3ea6e9e5 100644
--- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
@@ -58,7 +58,8 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.3.0,4.0.0)",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.3.0,4.0.0)",
org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)",
org.eclipse.ui.editors;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
Eclipse-LazyStart: true
Bundle-ClassPath: .
Import-Package: com.ibm.icu.text
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceResolver.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceResolver.java
index 9afa75582..908511696 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceResolver.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceResolver.java
@@ -10,8 +10,10 @@
*******************************************************************************/
package org.eclipse.debug.internal.ui.stringsubstitution;
+import java.io.File;
import java.net.URI;
+import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -137,9 +139,9 @@ public class ResourceResolver implements IDynamicVariableResolver {
if (name.endsWith("_loc")) { //$NON-NLS-1$
uri = resource.getLocationURI();
if(uri != null) {
- path = new Path(uri.getPath());
- if(path != null) {
- return path.toOSString();
+ File file = EFS.getStore(uri).toLocalFile(0, null);
+ if(file != null) {
+ return file.getAbsolutePath();
}
}
} else if (name.endsWith("_path")) { //$NON-NLS-1$

Back to the top