Bug 258826 [Commands] TextState cannot go back to its original state
TextState starts off as null, but cannot be reset to null (IllegalArgumentException). PW
bundles/org.eclipse.jface/src/org/eclipse/jface/menus/TextState.java
* </p>
 * <p>
 * Clients may instantiate this class, but must not extend.
 * </p>
 * 
 * @since 3.2
 * @see INamedHandleStateIds
 */
public class TextState extends PersistentState {
	public final void load(final IPreferenceStore store,
			final String preferenceKey) {
		final String value = store.getString(preferenceKey);
		setValue(value);
	}
	public final void save(final IPreferenceStore store,
			final String preferenceKey) {
		final Object value = getValue();
		if (value instanceof String) {
			store.setValue(preferenceKey, ((String) value));
		}
	}
	public void setValue(final Object value) {
		if (!(value instanceof String)) {
			throw new IllegalArgumentException(
					"TextState takes a String as a value"); 
		}
		super.setValue(value);
	}
}