Skip to content

Commit 30e493c

Browse files
committed
ScriptModule: inject also the ScriptModule itself
For the ImageJ 1.x macro engine, we will want to access the script module's info to find out what outputs are required so we can append code to set it in a thread-local manner. See also imagej/imagej-legacy#10 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 7af2f44 commit 30e493c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/scijava/script/ScriptModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ public void run() {
146146

147147
// initialize the script engine
148148
engine.put(ScriptEngine.FILENAME, path);
149+
engine.put(ScriptModule.class.getName(), this);
149150
final ScriptContext scriptContext = engine.getContext();
150151
if (output != null) scriptContext.setWriter(output);
151152
final PrintWriter errorPrinter;

0 commit comments

Comments
 (0)