scijava-common icon indicating copy to clipboard operation
scijava-common copied to clipboard

ObjectWidget should have "None" option for non-required inputs

Open imagejan opened this issue 5 years ago • 6 comments

When writing something like:

#@ Img input1
#@ Img (required=false) input2

println input2

... we should have a "None" option for input2, otherwise the required=false doesn't make sense as the UI in fact makes it "required". Changes are likely required to go into AbstractInputHarvester, as well as maybe into scijava-ui-swing.

See also https://github.com/ilastik/ilastik4ij/issues/7#issuecomment-664986256.

/cc @k-dominik

imagejan avatar Jul 28 '20 11:07 imagejan

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/how-to-create-a-plugin-parameter-thar-is-required-false-and-autoffll-false/40950/2

imagesc-bot avatar Jul 28 '20 19:07 imagesc-bot

Thank you very much @imagejan for filing this :)

k-dominik avatar Jul 29 '20 06:07 k-dominik

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/dynamiccommand-not-displaying-without-error/60767/9

imagesc-bot avatar Dec 10 '21 08:12 imagesc-bot

@ctrueden @imagejan Any progress on that front? I stumbled over the same issue where the UI popped up even though only non-required parameters were missing. In my case it was calling from IJ-Macro where those non-required parameters were not recorded.

tischi avatar May 16 '22 07:05 tischi

This issue here is just about ObjectWidget. @tischi I think https://github.com/scijava/scijava-common/issues/317 is more relevant for your issue.

imagejan avatar May 16 '22 20:05 imagejan

I was going to say the same thing, yeah, #317 is the issue about that. And no, unfortunately no one has worked on adding a None option for non-required multiple choice.

ctrueden avatar May 16 '22 20:05 ctrueden