TextInputControl, through the control's own API.
StandardActions#UNDO and StandardActions#REDO therefore drive that control's private
undo stack, which is right only where the control's text is not a value of the library —
today that is the search field alone. In a field editor the same two items would fight the
library's journal: Ctrl+Z there is routed to the global stack by the filter in
org. (issue #11420), so a menu Undo
would revert the control's text, the text listener would see a fresh edit, and the undo the
user asked for would arrive on the stack as a new forward change.
That is why getDefaultContextMenuItems leaves both out. Wiring undo into a field editor's
menu means routing it to org., not to the control.
| Modifier and Type | Field and Description |
|---|---|
| private final StandardActions | |
| private static final boolean | |
| private final TextInputControl |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static List | getDefaultContextMenuItems(TextInputControl textInputControl)
The items every text field in the entry editor gets, deliberately without Undo and Redo: in a field editor those belong to the library's journal, not to the control. |
| command | back to summary |
|---|---|
| private final StandardActions command | |
| SHOW_HANDLES | back to summary |
|---|---|
| private static final boolean SHOW_HANDLES | |
| textInputControl | back to summary |
|---|---|
| private final TextInputControl textInputControl | |
| EditorContextAction | back to summary |
|---|---|
| public EditorContextAction(StandardActions command, TextInputControl textInputControl) | |
| execute | back to summary |
|---|---|
public void execute()
| |
| getDefaultContextMenuItems | back to summary |
|---|---|
| public static List The items every text field in the entry editor gets, deliberately without Undo and Redo: in a field editor those belong to the library's journal, not to the control. See the class javadoc. | |