Ticket #837 (closed task: moved)

Opened 8 years ago

Last modified 7 years ago

BeanShell-based IJ2 macro language

Reported by: curtis Owned by: dscho
Priority: critical Milestone: imagej2-b8-analysis
Component: Scripting Version:
Severity: non-issue Keywords:
Cc: wayne Blocked By:
Blocking: #1516

Description (last modified by dscho) (diff)

By bundling ImageJ1 with the ImageJ2 distribution, we can support the IJ1 macro language as is with full backward compatibility. This is great, but users have asked for more: they want to "mix and match" IJ2 API calls within existing macros. This feature will be an excellent way for people to begin migrating existing workflows into IJ2 without needing to switch all at once.

We plan to provide such capabilities by porting the IJ1 macro language functions on top of BeanShell. This approach is very powerful because it will allow IJ2 macros to harness the full IJ1 and IJ2 Java APIs, in addition to all the existing macro functions. It also provides object oriented capabilities, required anyway by IJ2.

The macro language is largely syntactically compatible with BeanShell, with four notable exceptions:

1) Passing uninitialized variables to built-in functions for side-effect assignments. E.g.: getSelectionCoordinates.
2) The function keyword for declaring subroutines.
3) Functions with no arguments not needing parentheses.
4) The (disabled by default) expandable array syntax.

We have already solved 1), and are confident that 2) and 3) will be very easy. 4) is more difficult but  enabling it in IJ1 issues a warning about IJ2 compatibility so that users are aware of the consequences.

Change History

comment:1 Changed 8 years ago by curtis

  • Blocking 12 added

comment:2 Changed 8 years ago by dscho

  • Status changed from new to accepted

comment:3 Changed 8 years ago by dscho

  • Description modified (diff)

Modify the description so Trac does not think we are talking about tickets here.

comment:4 Changed 8 years ago by dscho

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5

comment:5 Changed 7 years ago by curtis

  • Blocking 1516 added; 12 removed

comment:6 Changed 7 years ago by bdezonia

  • Milestone changed from imagej2-b7-ndim-data to imagej2-b8-analysis

comment:7 Changed 6 years ago by curtis

  • Status changed from accepted to closed
  • Resolution set to moved
Note: See TracTickets for help on using tickets.