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() {
155
155
156
156
@ Override
157
157
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 >();
159
162
for (final String choice : getParameter ().choices ()) {
160
- choices .add (tValue (choice ));
163
+ choiceList .add (tValue (choice ));
161
164
}
162
- return choices ;
165
+ return choiceList ;
163
166
}
164
167
165
168
// -- BasicDetails methods --
Original file line number Diff line number Diff line change 32
32
package org .scijava .module ;
33
33
34
34
import java .lang .reflect .Type ;
35
+ import java .util .Arrays ;
35
36
import java .util .List ;
36
37
37
38
import org .scijava .AbstractBasicDetails ;
@@ -258,7 +259,8 @@ public int getColumnCount() {
258
259
259
260
@ Override
260
261
public List <T > getChoices () {
261
- return null ;
262
+ final T [] choices = getType ().getEnumConstants ();
263
+ return choices == null ? null : Arrays .asList (choices );
262
264
}
263
265
264
266
@ Override
You can’t perform that action at this time.
0 commit comments