Skip to content

Support Enums in SwingObjectWidget #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2022
Merged

Support Enums in SwingObjectWidget #51

merged 1 commit into from
May 27, 2022

Conversation

imagejan
Copy link
Member

For Enum parameters, model.getChoices() returns all available enum values by default, so let's just support any model that has valid choices.

This commit also adds a test for SwingObjectWidget, testing Enum parameters as well as Object parameters with and without objects in their object pool.

This PR currently depends on scijava/scijava-common#400 that adds a required null check, so that PR should be merged and this one updated with a newer version of scijava-common.

Closes scijava/scijava-common#397.

imagejan referenced this pull request in mobie/mobie-io Jan 11, 2022
@ctrueden ctrueden force-pushed the enum-object-widget branch from 0417191 to 49cd93c Compare May 27, 2022 19:48
For Enum parameters, model.getChoices() returns all available enum
values by default, so let's just support any model that has valid
choices.

This commit also adds a test for SwingObjectWidget, testing Enum
parameters as well as Object parameters with and without objects in
their object pool.
@ctrueden ctrueden force-pushed the enum-object-widget branch from 49cd93c to 7d36b38 Compare May 27, 2022 19:50
@ctrueden ctrueden marked this pull request as ready for review May 27, 2022 19:50
@ctrueden ctrueden merged commit 94e06b5 into master May 27, 2022
@ctrueden ctrueden deleted the enum-object-widget branch May 27, 2022 19:51
@ctrueden
Copy link
Member

Thank you, @imagejan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enum parameters don't work in scripts
2 participants