Class AbstractFormatterPreferencePage.OptionFactory
- java.lang.Object
-
- com.e1c.g5.v8.dt.formatter.ui.preferences.page.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 toAbstractFormatterPreferencePage#optionMap
to be able to perform serialize/deserialize and save
-
-
Constructor Summary
Constructors Constructor Description OptionFactory()
Creates new instance of OptionFactory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IOption<Boolean>
createBooleanOption(String preferenceKey, String presentation, org.eclipse.jface.preference.IPreferenceStore store)
Create newStoreBasedBooleanOption
that holds Boolean value and will be stored with the given preferenceKeyIOption<Integer>
createIntegerOption(String preferenceKey, String presentation, org.eclipse.jface.preference.IPreferenceStore store)
Create newcreateStoreBasedIntegerOption
that holds Integer value and will be stored with the given preferenceKeyIOption<String>
createMultiStringOption(String preferenceKey, String presentation, String[] options, String[] optionPresentations, org.eclipse.jface.preference.IPreferenceStore store)
Create newMultiStringOption
that holds String value and will be stored with the given preferenceKey represents chose-one option.IOption<Boolean>
createShowWhitespaceCharactersOption(String preferenceKey, org.eclipse.jface.preference.IPreferenceStore store)
Creates specific option that is used to turn on/off showing of whitespace characters in preview editorsIOption<String>
createStringOption(String preferenceKey, String presentation, org.eclipse.jface.preference.IPreferenceStore store)
Create newStoreBasedStringOption
that holds String value and will be stored with the given preferenceKey
-
-
-
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 newMultiStringOption
that holds String value and will be stored with the given preferenceKey represents chose-one option.- Specified by:
createMultiStringOption
in interfaceIOptionFactory
- Parameters:
preferenceKey
- The preference key that is associated to this option, cannot benull
presentation
- The presentation text to set on associated label, cannot benull
options
- The options that can be chosen, cannot benull
optionPresentations
- The options localized presentation, cannot benull
store
- The store which is bound to this option. Any set/get will be adjusted with it, can benull
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 newcreateStoreBasedIntegerOption
that holds Integer value and will be stored with the given preferenceKey- Specified by:
createIntegerOption
in interfaceIOptionFactory
- Parameters:
preferenceKey
- The preference key that is associated to this option, cannot benull
presentation
- The localized presentation of this option, cannot benull
store
- The store that performs read/write of this option, can benull
- 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 newStoreBasedStringOption
that holds String value and will be stored with the given preferenceKey- Specified by:
createStringOption
in interfaceIOptionFactory
- Parameters:
preferenceKey
- The preference key that is associated to this option, cannot benull
presentation
- The localized presentation of this option, cannot benull
store
- The store that performs read/write of this option, can benull
- 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 newStoreBasedBooleanOption
that holds Boolean value and will be stored with the given preferenceKey- Specified by:
createBooleanOption
in interfaceIOptionFactory
- Parameters:
preferenceKey
- The preference key that is associated to this option, cannot benull
presentation
- The localized presentation of this option, cannot benull
store
- The store that performs read/write of this option, can benull
- 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 interfaceIOptionFactory
- Parameters:
preferenceKey
- The key associated with showing whitespace characters, cannot benull
store
- The store associated with this preferences to perform write/read access, can benull
- Returns:
- Representation of
ShowWhitespaceCharactersOption
, cannot benull
-
-