org.eclipse.eef.ide.ui.internal.widgets

## Class EEFTextMemento

- java.lang.Object
- - org.eclipse.eef.ide.ui.internal.widgets.EEFTextMemento

    public class EEFTextMemento
    extends java.lang.Object

A simple data record to remember un-commited user input for recovery in case of concurrent changes that could override this input.

### Field Summary

Fields
`static java.lang.String` `KEY` The key used to attach the user input memento to the widget.

### Constructor Summary

Constructors
Constructor and Description
`EEFTextMemento(EEFTextDescription description, java.lang.Object self, java.lang.String referenceValue, java.lang.String userInput)` The constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `appliesTo(EEFTextDescription textDescription, java.util.Map<java.lang.String,java.lang.Object> variables)` Indicates if the memento applies to the given lifecycle manager.
`EEFTextDescription` `getDescription()` Return the description.
`java.lang.String` `getReferenceValue()` Return the referenceValue.
`java.lang.String` `getUserInput()` Return the userInput.
`static EEFTextMemento` `of(org.eclipse.swt.widgets.Widget widget)` Returns the memento of the given widget.
`static void` `remove(org.eclipse.swt.widgets.Widget widget)` Removes the memento of the given widget.
`void` `store(org.eclipse.swt.widgets.Widget widget)` Stores the memento in the given widget.
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### KEY

    public static final java.lang.String KEY

The key used to attach the user input memento to the widget.

See Also:
  Constant Field Values

### Constructor Detail

#### EEFTextMemento

    public EEFTextMemento(EEFTextDescription description,
                          java.lang.Object self,
                          java.lang.String referenceValue,
                          java.lang.String userInput)

The constructor.

Parameters:
  `description` - The description of the text widget.
  `self` - The "self" target element
  `referenceValue` - The reference value corresponding to the pristine text computed from the model
  `userInput` - The user input

### Method Detail

#### appliesTo

    public boolean appliesTo(EEFTextDescription textDescription,
                             java.util.Map<java.lang.String,java.lang.Object> variables)

Indicates if the memento applies to the given lifecycle manager.

Parameters:
  `textDescription` - The description of the text widget of the lifecycle manager
  `variables` - The variables of the lifecycle manager
Returns:
  `true` if the memento applies to the lifecycle manager, `false` otherwise.

#### store

    public void store(org.eclipse.swt.widgets.Widget widget)

Stores the memento in the given widget.

Parameters:
  `widget` - The widget

#### of

    public static EEFTextMemento of(org.eclipse.swt.widgets.Widget widget)

Returns the memento of the given widget.

Parameters:
  `widget` - The widget
Returns:
  The memento of the given widget

#### remove

    public static void remove(org.eclipse.swt.widgets.Widget widget)

Removes the memento of the given widget.

Parameters:
  `widget` - The widget

#### getDescription

    public EEFTextDescription getDescription()

Return the description.

Returns:
  the description

#### getReferenceValue

    public java.lang.String getReferenceValue()

Return the referenceValue.

Returns:
  the referenceValue

#### getUserInput

    public java.lang.String getUserInput()

Return the userInput.

Returns:
  the userInput

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`