Class AbstractFormatterPreferencePage.OptionFactory

  • All Implemented Interfaces:
    IOptionFactory
    Enclosing class:
    AbstractFormatterPreferencePage

    protected class AbstractFormatterPreferencePage.OptionFactory
    extends Object
    implements IOptionFactory
    This is basic implementation of #IOptionFactory. It creates new instances of options and adds it to AbstractFormatterPreferencePage#optionMap to be able to perform serialize/deserialize and save
    • Constructor Detail

      • OptionFactory

        public OptionFactory()
        Creates new instance of OptionFactory
    • Method Detail

      • createMultiStringOption

        public IOption<String> createMultiStringOption​(String preferenceKey,
                                                       String presentation,
                                                       String[] options,
                                                       String[] optionPresentations,
                                                       org.eclipse.jface.preference.IPreferenceStore store)
        Description copied from interface: IOptionFactory
        Create new MultiStringOption that holds String value and will be stored with the given preferenceKey represents chose-one option.
        Specified by:
        createMultiStringOption in interface IOptionFactory
        Parameters:
        preferenceKey - The preference key that is associated to this option, cannot be null
        presentation - The presentation text to set on associated label, cannot be null
        options - The options that can be chosen, cannot be null
        optionPresentations - The options localized presentation, cannot be null
        store - The store which is bound to this option. Any set/get will be adjusted with it, can be null options associated with optionPresenations by array's index.
        Returns:
        Representation of MultiStringOption, cannot be null
      • createIntegerOption

        public IOption<Integer> createIntegerOption​(String preferenceKey,
                                                    String presentation,
                                                    org.eclipse.jface.preference.IPreferenceStore store)
        Description copied from interface: IOptionFactory
        Create new createStoreBasedIntegerOption that holds Integer value and will be stored with the given preferenceKey
        Specified by:
        createIntegerOption in interface IOptionFactory
        Parameters:
        preferenceKey - The preference key that is associated to this option, cannot be null
        presentation - The localized presentation of this option, cannot be null
        store - The store that performs read/write of this option, can be null
        Returns:
        Representation of IntegerOption, cannot be null
      • createStringOption

        public IOption<String> createStringOption​(String preferenceKey,
                                                  String presentation,
                                                  org.eclipse.jface.preference.IPreferenceStore store)
        Description copied from interface: IOptionFactory
        Create new StoreBasedStringOption that holds String value and will be stored with the given preferenceKey
        Specified by:
        createStringOption in interface IOptionFactory
        Parameters:
        preferenceKey - The preference key that is associated to this option, cannot be null
        presentation - The localized presentation of this option, cannot be null
        store - The store that performs read/write of this option, can be null
        Returns:
        Representation of StringOption, cannot be null
      • createBooleanOption

        public IOption<Boolean> createBooleanOption​(String preferenceKey,
                                                    String presentation,
                                                    org.eclipse.jface.preference.IPreferenceStore store)
        Description copied from interface: IOptionFactory
        Create new StoreBasedBooleanOption that holds Boolean value and will be stored with the given preferenceKey
        Specified by:
        createBooleanOption in interface IOptionFactory
        Parameters:
        preferenceKey - The preference key that is associated to this option, cannot be null
        presentation - The localized presentation of this option, cannot be null
        store - The store that performs read/write of this option, can be null
        Returns:
        Representation of BooleanOption, cannot be null
      • createShowWhitespaceCharactersOption

        public IOption<Boolean> createShowWhitespaceCharactersOption​(String preferenceKey,
                                                                     org.eclipse.jface.preference.IPreferenceStore store)
        Description copied from interface: IOptionFactory
        Creates specific option that is used to turn on/off showing of whitespace characters in preview editors
        Specified by:
        createShowWhitespaceCharactersOption in interface IOptionFactory
        Parameters:
        preferenceKey - The key associated with showing whitespace characters, cannot be null
        store - The store associated with this preferences to perform write/read access, can be null
        Returns:
        Representation of ShowWhitespaceCharactersOption, cannot be null