I guess, probably this has been discussed somewhere already…
Looking for a IJ2 command using the IJ2 search function one obtains useful additional information, like [Help] and [Source] buttons. However, when launching a command from the menu tree, this information is not available.
I just found myself being tempted to add
buttons to all my commands.
Is this recommended?
One advantage could be that some of this could probably be automatically converted into the information that is seen in KNIME for each node. Maybe such logic exists already?
…and if this is considered a good idea then it would be probably nice if those four buttons were in one row, e.g. at the bottom of a command.
What might be nice would be to build these in to the @Plugin(type = Command.class) dialog machinery. But maybe using @Parameter Button is sufficient with no special casing? I am ambivalent.
The search bar works via a totally separate subsystem—those buttons are SearchActionFactory plugins. But if modules supported more self-documentation metadata like you suggest, then the corresponding SearchActionFactory plugins could just piggyback off of that so that e.g. when you click “Help” it opens whatever URL the module itself has declared as its help URL.
It is not a bad solution. Certainly better than not having a help available at all. But it does create extra menu entries. It would be slick if we could transition away from every plugin have separate help commands, in favor of some built-in help machinery like what @Christian_Tischer suggests.
It should be doable to improve the Swing dialog logic to put multiple sequential @Parameter Button widgets all on a single row, instead of on separate rows. I don’t have time to work on that right now, but please feel free to file an issue in the scijava/scijava-ui-swing repository.
A nice mini-project for a future hackathon in Konstanz??
The Help button is very simple. Here is how it works. It just converts the module title into an ImageJ wiki URL, replacing spaces etc. with _, and opens it using the platform service. If that is not working for you, then maybe your PlatformService#open(URL) method is broken in general? You can test by pressing shift+[ to open the Script Interpreter, then executing the statement: