Class MultiStringOption

  • All Implemented Interfaces:
    IOption<String>

    public class MultiStringOption
    extends StringOption
    This class represents a chose-one option
    • Constructor Detail

      • MultiStringOption

        public MultiStringOption​(String preferenceKey,
                                 String presentation,
                                 IPreferenceManager manager,
                                 org.eclipse.jface.preference.IPreferenceStore store,
                                 String[] options,
                                 String[] optionPresentations)
        Creates new instance of chose-one option with given preference key, preference manager and array of options to chose from
        Parameters:
        preferenceKey - The associated to this option preference key, cannot be null
        manager - The manager that stores this option, cannot be null
        presentation - The options presentation that describes its aim, cannot be null
        options - The options to chose from, cannot be null
        optionPresentations - The options values presentation, cannot be null
    • Method Detail

      • getOptions

        public String[] getOptions()
        Returns options that can be chosen
        Returns:
        Options that can be chosen, cannot be null
      • getOptionsPresentations

        public String[] getOptionsPresentations()
        Returns optionsAndPresentations keys as array
        Returns:
        Presentations to options
      • getCurentChoisePresentation

        public String getCurentChoisePresentation()
        Returns presentation of current value
        Returns:
        The string that is presentation of current value, cannot be null
      • handleSelection

        public void handleSelection​(String value)
        Description copied from interface: IOption
        This method invoked when associated UI element has changed selection and the given value is now set to UI element So there is no need to update UI element but preference representation. This method shall not write preferences right to the store as this changes can be canceled with no callback.
        Specified by:
        handleSelection in interface IOption<String>
        Overrides:
        handleSelection in class AbstractOption<String>
        Parameters:
        value - the new value to be set, can be null
      • setValue

        public void setValue​(String value)
        Description copied from interface: IOption
        Sets the value of this option to the given value. This shall update UI representation
        Specified by:
        setValue in interface IOption<String>
        Overrides:
        setValue in class AbstractOption<String>
        Parameters:
        value - , cannot be null