I'm playing with Eclipse Monkey and its DOM examples.
At first I did not understood in the
Find_System_Prints.em example where the
window variable was coming from.
After diving into in the
org.eclipse.eclipsemonkey plug-in source code, I found out that it is defined as a standard global variable in
RunMonkeyScript.defineStandardGlobalVariables(Scriptable scope) method.
Incidentally, it is the only global variable added by Eclipse Monkey.
The following code is also commented in this method (in version 0.1.6 of the
// Object wrappedWorkspace = Context.javaToJS(ResourcesPlugin // .getWorkspace(), scope); // ScriptableObject.putProperty(scope, "workspace", wrappedWorkspace);
workspace variable is instead contributed by the
To sum up,
window is available for free in your Monkey scripts while you will have to reference this DOM URL to have access to the