File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
src/main/java/org/scijava Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -155,11 +155,14 @@ public int getColumnCount() {
155155
156156 @ Override
157157 public List <T > getChoices () {
158- final ArrayList <T > choices = new ArrayList <T >();
158+ final String [] choices = getParameter ().choices ();
159+ if (choices .length == 0 ) return super .getChoices ();
160+
161+ final ArrayList <T > choiceList = new ArrayList <T >();
159162 for (final String choice : getParameter ().choices ()) {
160- choices .add (tValue (choice ));
163+ choiceList .add (tValue (choice ));
161164 }
162- return choices ;
165+ return choiceList ;
163166 }
164167
165168 // -- BasicDetails methods --
Original file line number Diff line number Diff line change 3232package org .scijava .module ;
3333
3434import java .lang .reflect .Type ;
35+ import java .util .Arrays ;
3536import java .util .List ;
3637
3738import org .scijava .AbstractBasicDetails ;
@@ -258,7 +259,8 @@ public int getColumnCount() {
258259
259260 @ Override
260261 public List <T > getChoices () {
261- return null ;
262+ final T [] choices = getType ().getEnumConstants ();
263+ return choices == null ? null : Arrays .asList (choices );
262264 }
263265
264266 @ Override
You can’t perform that action at this time.
0 commit comments