* added support of eclipse relative paths for interpreters, debuggers, validators
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/InterpreterDefinitionsContainer.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/InterpreterDefinitionsContainer.java
index e4ba7d4..3ed2027 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/InterpreterDefinitionsContainer.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/InterpreterDefinitionsContainer.java
@@ -421,7 +421,7 @@
// Determine and set the 'path' attribute for the Interpreter
String installPath = ""; //$NON-NLS-1$
- File installLocation = Interpreter.getInstallLocation();
+ File installLocation = Interpreter.getRawInstallLocation();
if (installLocation != null) {
installPath = installLocation.toString();
}
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterInstall.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterInstall.java
index 10fe22a..451af0d 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterInstall.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/AbstractInterpreterInstall.java
@@ -17,6 +17,7 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.dltk.internal.launching.DLTKLaunchingPlugin;
import org.eclipse.dltk.internal.launching.DebugRunnerDelegate;
+import org.eclipse.dltk.utils.PlatformFileUtils;
/**
* Abstract implementation of a interpreter install.
@@ -83,6 +84,10 @@
}
public File getInstallLocation() {
+ return PlatformFileUtils
+ .findAbsoluteOrEclipseRelativeFile(fInstallLocation);
+ }
+ public File getRawInstallLocation() {
return fInstallLocation;
}
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ExternalDebuggingEngineRunner.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ExternalDebuggingEngineRunner.java
index 8fedd58..e2eb395 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ExternalDebuggingEngineRunner.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/ExternalDebuggingEngineRunner.java
@@ -5,6 +5,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.dltk.core.PreferencesLookupDelegate;
import org.eclipse.dltk.internal.launching.InterpreterMessages;
+import org.eclipse.dltk.utils.PlatformFileUtils;
public abstract class ExternalDebuggingEngineRunner extends
DebuggingEngineRunner {
@@ -16,7 +17,8 @@
protected final InterpreterConfig addEngineConfig(InterpreterConfig config,
PreferencesLookupDelegate delegate) throws CoreException {
- final File file = getDebuggingEnginePath(delegate);
+ final File file = PlatformFileUtils
+ .findAbsoluteOrEclipseRelativeFile(getDebuggingEnginePath(delegate));
// Checking debugging engine path
if (file == null || file.toString().length() == 0) {
@@ -49,7 +51,7 @@
protected File getDebuggingEnginePath(PreferencesLookupDelegate delegate) {
String key = getDebuggingEnginePreferenceKey();
String qualifier = getDebuggingEnginePreferenceQualifier();
-
+
String path = delegate.getString(qualifier, key);
if (path != null) {
return new File(path);
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/IInterpreterInstall.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/IInterpreterInstall.java
index 75aa8b1..9b57795 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/IInterpreterInstall.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/IInterpreterInstall.java
@@ -16,7 +16,7 @@
public interface IInterpreterInstall extends IBuiltinModuleProvider {
// Runner
IInterpreterRunner getInterpreterRunner(String mode);
-
+
String getNatureId();
// Id
@@ -27,8 +27,10 @@
void setName(String name);
- // Install location
- File getInstallLocation();
+ // Also search for Platform location relative locations.
+ File getInstallLocation();
+ //
+ File getRawInstallLocation();
void setInstallLocation(File installLocation);
@@ -37,8 +39,9 @@
// Library locations
LibraryLocation[] getLibraryLocations();
-
+
EnvironmentVariable[] getEnvironmentVariables();
+
void setEnvironmentVariables(EnvironmentVariable[] variables);
void setLibraryLocations(LibraryLocation[] locations);
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/InterpreterStandin.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/InterpreterStandin.java
index 42c2f1f..c012225 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/InterpreterStandin.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/launching/InterpreterStandin.java
@@ -78,7 +78,7 @@
*/
private void init(IInterpreterInstall realInterpreter) {
setName(realInterpreter.getName());
- setInstallLocation(realInterpreter.getInstallLocation());
+ setInstallLocation(realInterpreter.getRawInstallLocation());
setLibraryLocations(realInterpreter.getLibraryLocations());
setInterpreterArgs(realInterpreter.getInterpreterArgs());
setEnvironmentVariables(realInterpreter.getEnvironmentVariables());
@@ -110,7 +110,7 @@
}
realInterpreter.setName(getName());
- realInterpreter.setInstallLocation(getInstallLocation());
+ realInterpreter.setInstallLocation(getRawInstallLocation());
realInterpreter.setLibraryLocations(getLibraryLocations());
realInterpreter.setEnvironmentVariables(getEnvironmentVariables());
realInterpreter.setInterpreterArgs(getInterpreterArgs());