[ImageJ-bugs] [Bug 835] Fiji hangs when installing macro tool
bugzilla at fiji.sc
bugzilla at fiji.sc
Tue Aug 26 00:26:45 CDT 2014
http://fiji.sc/bugzilla/show_bug.cgi?id=835
--- Comment #12 from Ilan Tal <ilan.tal at gmail.com> ---
I think it is time for a minor overhaul on Menus.java. I took Mark's idea of
running the actual, up-to-date Fiji program and attaching Netbeans to it. This
gives me the ability to look at all the variables and to compare the run of
ImageJ to the run of Fiji. It is a very powerful idea.
Inside validMacroName there is a isFiji static variable which I noticed was
always false. This morning I decided to have a look. This code is in the
Menus.java constructor
isFiji = title!=null && title.contains("Fiji");
and it clearly is no longer working. It used to be that Fiji was started by
fiji-linux, but now ImageJ-linux32 is used. A breakpoint on the constructor
shows that Fiji returns a title of ImageJ. So if the 2 cases in validMacroName
still need to depend upon Fiji or not Fiji, this needs to be fixed (how is a
very good question).
Now back to my problem with macros, which has been extended to many macros I
wasn't even aware of. I have a Window_Level_Tool.jar and a
Postage_Action_Tool.ijm inside the Tools folder. Both work perfectly fine under
ImageJ. The Window_Level_Tool.jar works fine under Fiji as well but
Postage_Action_Tool.ijm fails under Fiji. Why?
Yesterday I saw that name.endsWith(".jar") picks up my jar file while
name.endsWith(".ijm") works in ImageJ and fails in Fiji. Why? One possibility
is there is some unseen character in the file name. The trim() command would
remove this problem. Another possibility is name.endsWith(".jar") is operated
in the current instance of Menus.java, whereas name.endsWith(".ijm") is
operated in a static program which may have some subtle difference.
I did a search for validMacroName and found references to it only inside
Menus.java. From this there is a possibility that it need not be static. In any
case it is broken because isFiji is rubbish (always false).
As a minimum I would suggest
String name = list[i].trim();
as something which can't hurt and might possibly help. The real test is to make
an experimental version with the trim() and test it. This is no problem for me
inside ImageJ, but I have no control over Fiji and its contents.
If anyone can give some help and suggestions maybe we can move this bug to a
solution.
Thanks,
Ilan
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20140826/3d0d4308/attachment.html>
More information about the Imagej-bugs
mailing list