public static Preference createMultiTextPreference ( String name , String label , TextDisplay displayType , List < String > defaultValues ) { MultiTextPreferenceInput input = new MultiTextPreferenceInput ( ) ; input . getDefaults ( ) . addAll ( defaultValues ) ; input . setDisplay ( displayType ) ; Preference pref = new Preference ( ) ; pref . setName ( name ) ; pref . setLabel ( label ) ; pref . setPreferenceInput ( new JAXBElement < MultiTextPreferenceInput > ( new QName ( "multi-text-parameter-input" ) , MultiTextPreferenceInput . class , input ) ) ; return pref ; }
Create a multi - valued text input preference .