[ImageJ-devel] Macros and scripting in Imagej 2.0

Johannes Schindelin Johannes.Schindelin at gmx.de
Thu Sep 8 17:00:16 CDT 2011


Dear Grant,

On Thu, 8 Sep 2011, Grant B. Harris wrote:

> -- A "Default" IJ2 Scripting Language
> 
> I think when we speak of a script, we are referring to a 'high-level', 
> domain-specific language that makes it easy/ier to do image processing.  
> The ImageJ Macro language is certainly such a thing; so perhaps the 
> question is whether it provides a good starting point for IJ2.
> 
> Since existing IJ1 Macros will continue to function through the Legacy 
> layer, we could 'migrate' the IJ1 Macro language to BeanShell with some 
> changes that make it consonant with Java/C; that way users of IJ1 macros 
> would only need to understand the changes, but would otherwise find it 
> familiar.

It is much "worse" than that: existing users already know the macro 
language. So there is not even a single bit of an option. On the other 
hand, it relieves us from yet another decision.

As to Beanshell, I think I already listed the problems with that?

> -- Script Execution
> 
> The real value of the Java 6 ScriptingEngine is that it provides 
> execution polyglotinousness.  ;-0 So plugins/modules written in any 
> suppported language can be easily used by a naive user.

The problem is that the ScriptingEngine does not provide half the methods 
we require.

> -- 'Macro' Recording
> 
> The ability to record events (macros) is useful for:
>     - creating a sequence of actions that the user just wants to repeat.  
>       In this case, the language used for the encoding is not important, 
>       as long as it works.
>     - creating code that is the basis for a script or program that they 
>       want to write.  In this case, the user wants a choice of the 
>       language for the code that results from the recording.

No question about that.

> -- Development Tools
> 
>     - Interactive Interpreter provides:
>         - single stepping
>         - keeping states and evaluating incrementally
> 
>     The interpretted scripting languages have interactive consoles that can be
> embedded in an application. (e.g. BeanShell and Jython have an interactive
> console, Clojure has its REPL.)
> 
>     - Code Editor provides
>         - syntax highlighting
>         - code completion
>         - refactoring
> 
>     An editor may be integrated with an interactive console, allowing one or
> more lines to be selected and interpretted/executed.
> 
>     - Debugger might provide:
>         - single stepping
>         - setting breakpoints
>         - state inspector of objects and variables
>         - setting watches
> 
>     Jython has a debugging framework
> (http://www.jython.org/docs/library/bdb.html) and there are a variety of
> debugging tools that we might possible incorportate.
> 
> What development tools can we realisticly provide?  At some point a developer
> may be better served by an IDE.  Eclipse and NetBeans have plugins for most of
> the languages of consequence.

Good luck with integrating Eclipse and/or NetBeans seamlessly into IJ2. I 
really mean it, have you considered what it takes?

Ciao,
Johannes




More information about the ImageJ-devel mailing list