Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2009-09-10 21:12:25 +0000
committerDarin Wright2009-09-10 21:12:25 +0000
commitd019cb75c4a5a3ff01d6ade429cc010f8f55992c (patch)
tree71ec190619925ab4626482c5961eec74d7414bdd /org.eclipse.core.variables
parent32db0b837b1120edc41d8d3ea0ade84eb79262ea (diff)
downloadeclipse.platform.debug-d019cb75c4a5a3ff01d6ade429cc010f8f55992c.tar.gz
eclipse.platform.debug-d019cb75c4a5a3ff01d6ade429cc010f8f55992c.tar.xz
eclipse.platform.debug-d019cb75c4a5a3ff01d6ade429cc010f8f55992c.zip
Bug 263535 - resolution of ${eclipse_home} inconsistent with other vars like ${workspace_loc}
Diffstat (limited to 'org.eclipse.core.variables')
-rw-r--r--org.eclipse.core.variables/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java16
2 files changed, 15 insertions, 3 deletions
diff --git a/org.eclipse.core.variables/META-INF/MANIFEST.MF b/org.eclipse.core.variables/META-INF/MANIFEST.MF
index eb43f8008..b4215c634 100644
--- a/org.eclipse.core.variables/META-INF/MANIFEST.MF
+++ b/org.eclipse.core.variables/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.variables; singleton:=true
-Bundle-Version: 3.2.200.qualifier
+Bundle-Version: 3.2.300.qualifier
Bundle-Activator: org.eclipse.core.variables.VariablesPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
index 17ca4a1a7..ac5e100d8 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ package org.eclipse.core.internal.variables;
import java.net.URL;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.variables.IDynamicVariable;
import org.eclipse.core.variables.IDynamicVariableResolver;
@@ -31,7 +33,17 @@ public class EclipseHomeVariableResolver implements IDynamicVariableResolver {
if (installLocation != null) {
URL url = installLocation.getURL();
if (url != null) {
- String file = url.getFile();
+
+ // Try to convert the URL to an OS string, to be consistent with
+ // how other variables, like ${workspace_loc} resolve. See
+ // ResourceResolver.translateToValue(). [bugzilla 263535]
+ String file = url.getFile();
+ IPath path = Path.fromOSString(file);
+ String osstr = path.toOSString();
+ if (osstr.length() != 0) {
+ return osstr;
+ }
+
if (file.length() != 0) {
return file;
}

Back to the top