Posted by
lechristophe on
Jun 19, 2014; 7:23pm
URL: http://imagej.273.s1.nabble.com/Javascript-in-Fiji-does-not-work-anymore-tp5008314p5008336.html
Dear Jan and Johannes,
Thanks for your explanations.
It must be noted that Edit>Auto-import does not work with Javascript in the
Fiji script editor.
I sequentially run and manually added the classes at each error stop, now I
have calls for all the ImageJ classes used in my script (a dozen). I should
say that as a non-developper, my Javascript knowledge is mostly based on
web tutorials such as
http://fiji.sc/wiki/index.php/Javascript_Scripting(which is out dated now, I'm not sure I understand the new system enough to
edit it), and in these tutorials most exemple scripts don't import default
ij classes.
Thanks again for the help,
Christophe
2014-06-19 16:49 GMT+02:00 Jan Eglinger <
[hidden email]>:
> Hi all,
>
>
> On 19.06.2014, 4:22 PM, Jan Eglinger wrote:
>
>> I just discovered that there is an option to switch the auto-imports
>> back on: in Fiji's script editor, go to:
>>
>> *Edit > Auto-import (deprecated)*
>>
>>
> For the record:
> The auto-import was adopted from the Fiji script editor to the ImageJ
> script editor in these two commits (including very informative commit
> messages by Johannes Schindelin :):
>
>
https://github.com/imagej/imagej-ui-swing/commit/094a3ac5>
https://github.com/imagej/imagej-ui-swing/commit/d48a482f>
>
>
>> In any case, it might be a good idea to not trust the auto-imports but
>> import the classes you need explicitly:
>>
>> importClass(Packages.ij.IJ);
>> importClass(Packages.ij.gui.GenericDialog);
>>
>>
> Cheers,
> Jan
>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html