Package org.eclipse.jface.menus
Class TextState
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.State
org.eclipse.jface.commands.PersistentState
org.eclipse.jface.menus.TextState
 A piece of state carrying a single String.
 
 If this state is registered using INamedHandleStateIds.NAME or
 INamedHandleStateIds.DESCRIPTION, then this allows the handler to
 communicate a textual change for a given command. This is typically used by
 graphical applications to allow more specific text to be displayed in the
 menus. For example, "Undo" might become "Undo Typing" through the use of a
 TextState.
 
Clients may instantiate this class, but must not extend.
- Since:
- 3.2
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidload(IPreferenceStore store, String preferenceKey) Loads this state from the preference store, given the location at which to look.final voidsave(IPreferenceStore store, String preferenceKey) Saves this state to the preference store, given the location at which to write.voidSets the value for this state object.Methods inherited from class org.eclipse.jface.commands.PersistentStatesetShouldPersist, shouldPersistMethods inherited from class org.eclipse.core.commands.StateaddListener, dispose, fireStateChanged, getId, getValue, removeListener, setIdMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
- 
Constructor Details- 
TextStatepublic TextState()
 
- 
- 
Method Details- 
loadDescription copied from class:PersistentStateLoads this state from the preference store, given the location at which to look. This method must be symmetric with a call toPersistentState.save(IPreferenceStore, String).- Specified by:
- loadin class- PersistentState
- Parameters:
- store- The store from which to read; must not be- null.
- preferenceKey- The key at which the state is stored; must not be- null.
 
- 
saveDescription copied from class:PersistentStateSaves this state to the preference store, given the location at which to write. This method must be symmetric with a call toPersistentState.load(IPreferenceStore, String).- Specified by:
- savein class- PersistentState
- Parameters:
- store- The store to which the state should be written; must not be- null.
- preferenceKey- The key at which the state should be stored; must not be- null.
 
- 
setValueDescription copied from class:StateSets the value for this state object.
 
-