Skip to content

Prepare for a fancy ImageJ 1.x macro interpreter - #66

Merged
dscho merged 3 commits into
masterfrom
ij1-macro
May 21, 2014
Merged

dscho merged 3 commits into
masterfrom
ij1-macro

Conversation

@dscho

@dscho dscho commented May 21, 2014

Copy link
Copy Markdown
Contributor

We are about to add an ImageJ 1.x macro "script engine". By necessity, it will be very limited, but we can still make things a little bit better by handling @Parameter comments via the ScriptService (see imagej/imagej-legacy#10). This will require a little change in the ScriptService, though: we will need to tell what inputs and outputs are expected when evaluating the script, to be able to insert appropriate code before and after the script.

dscho added 3 commits May 21, 2014 13:14
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho

dscho commented May 21, 2014

Copy link
Copy Markdown
Contributor Author

@ctrueden could you have a quick look?

This PR actually also re-adds a unit test for the script service (I had one in ij-core by default, calling Javascript, but that one was moved together with the engine, so currently we actually have no unit test whatsoever for the script service at all in master...).

@ctrueden

Copy link
Copy Markdown
Member

I think this is great. Any reason we can't merge right away?

dscho added a commit that referenced this pull request May 21, 2014
Prepare for a fancy ImageJ 1.x macro interpreter
@dscho
dscho merged commit c842420 into master May 21, 2014
@dscho
dscho deleted the ij1-macro branch May 21, 2014 21:49
@dscho

dscho commented May 21, 2014

Copy link
Copy Markdown
Contributor Author

I suppose you're right. I was a little concerned that script engines might have problems with the bindings, given that they correspond to a class name. OTOH, the filename is already stored under a similar key (javax.script.filename), so I figure it is not too bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants