+ environment API
diff --git a/eclipsecon08/org.eclipse.dltk.examples.python/src/org/eclipse/dltk/examples/internal/python/interpreter/ExamplePythonInstallType.java b/eclipsecon08/org.eclipse.dltk.examples.python/src/org/eclipse/dltk/examples/internal/python/interpreter/ExamplePythonInstallType.java
index 3ad6b62..994e974 100644
--- a/eclipsecon08/org.eclipse.dltk.examples.python/src/org/eclipse/dltk/examples/internal/python/interpreter/ExamplePythonInstallType.java
+++ b/eclipsecon08/org.eclipse.dltk.examples.python/src/org/eclipse/dltk/examples/internal/python/interpreter/ExamplePythonInstallType.java
@@ -1,34 +1,44 @@
package org.eclipse.dltk.examples.internal.python.interpreter;
-import java.io.File;
import java.io.IOException;
import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.dltk.core.environment.IDeployment;
import org.eclipse.dltk.examples.internal.python.core.ExamplePythonNature;
import org.eclipse.dltk.examples.internal.python.core.PythonCorePlugin;
import org.eclipse.dltk.internal.launching.AbstractInterpreterInstallType;
import org.eclipse.dltk.launching.IInterpreterInstall;
+import org.osgi.framework.Bundle;
public class ExamplePythonInstallType extends AbstractInterpreterInstallType {
private static final String[] INTERPRETER_NAMES = { "python", "pythonw" };
+
public String getNatureId() {
return ExamplePythonNature.PYTHON_NATURE;
}
+
public String getName() {
return "Example Python";
}
+
protected String getPluginId() {
return PythonCorePlugin.PLUGIN_ID;
}
+
protected String[] getPossibleInterpreterNames() {
return INTERPRETER_NAMES;
}
+
protected IInterpreterInstall doCreateInterpreterInstall(String id) {
return new ExamplePythonInstall(this, id);
}
- protected File createPathFile() throws IOException {
- return storeToMetadata(PythonCorePlugin.getDefault(), "path.py", "scripts/path.py");
+
+ protected IPath createPathFile(IDeployment deployment) throws IOException {
+ Bundle bundle = PythonCorePlugin.getDefault().getBundle();
+ return deployment.add(bundle, "scripts/path.py");
}
+
protected ILog getLog() {
return PythonCorePlugin.getDefault().getLog();
}