Ticket #837 (closed task: moved)
Opened 2011-10-20T14:19:58-05:00
Last modified 2013-03-07T11:16:08-06:00
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)
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:3 Changed 2012-02-27T22:36:00-06:00 by dscho
- Description modified
Modify the description so Trac does not think we are talking about tickets here.
comment:4 Changed 2012-09-06T19:02:54-05:00 by dscho
- Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5
comment:6 Changed 2013-03-07T11:16:08-06:00 by bdezonia
- Milestone changed from imagej2-b7-ndim-data to imagej2-b8-analysis
comment:7 Changed 2014-05-06T08:54:17-05:00 by curtis
- Status changed from accepted to closed
- Resolution set to moved
Migrated to https://github.com/imagej/imagej-legacy/issues/7