Permalink
Browse files

Set Java launch configuration working directory based on working dir …

…from script launch config. Closes #18
  • Loading branch information...
1 parent 1304289 commit ebb5405e5a95864129821d6e682fd844dc9cee14 Ivan Inozemtsev committed Feb 23, 2013
@@ -312,4 +312,10 @@ public ITypeHierarchy newTypeHierarchy(WorkingCopyOwner owner,
IProgressMonitor monitor) throws ModelException {
return null;
}
+
+ @Override
+ public <E extends IModelElement> E getAncestor(Class<E> clazz) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
Binary file not shown.
@@ -8,7 +8,9 @@
using [java] org.eclipse.debug.core
using [java] org.eclipse.jdt.launching
-using [java] org.eclipse.dltk.launching
+using [java] org.eclipse.dltk.launching::ScriptLaunchConfigurationConstants
+using [java] org.eclipse.dltk.launching::AbstractScriptLaunchConfigurationDelegate
+using [java] org.eclipse.dltk.launching::ScriptRuntime
using [java] java.util::Map
using [java] java.util::HashMap
using [java] java.util::ArrayList
@@ -22,10 +24,14 @@ class JavaLaunchUtil
Str mainLaunchType
)
{
+ map := src.getAttributes
@panchenko

panchenko Feb 23, 2013

@komaz variable seems to be unused

@komaz

komaz Feb 23, 2013

Contributor

yeah, I'm still checking some things about attributes, so ok for now

+
scriptName := AbstractScriptLaunchConfigurationDelegate.getScriptProjectName(src)
interpreter := ScriptRuntime.computeInterpreterInstall(src)
fanHome := PathUtil.fanHome(interpreter.getInstallLocation.getPath)
+ target.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+ src.getAttribute(ScriptLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, fanHome.toFile.osPath))
target.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, scriptName)
target.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, mainLaunchType)

0 comments on commit ebb5405

Please sign in to comment.