Usually obtained from org., which owns the recorder's
lifetime and pushes what it collected. Constructing one directly is for the commands that
cannot use a block: those that collect on a background thread and push on the JavaFX
thread, or that abandon the operation part-way through. Those hand
org. the result of toChangeSet themselves.
The overloads taking FieldChange exist because that is what the model already returns
from setField, putKeywords, setCitationKey and friends, so recording a change is a
matter of handing the return value over rather than restating it.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | CompoundEdit(String
what the user did, as they would recognise it — see name)ChangeSet. It travels
unchanged into the set that toChangeSet builds, so whatever is passed here
is what a reader eventually sees.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | addEdit(CompoundEdit nested)
Folds another recorder in as a nested change, so one user action stays one undo step even when a command delegates its collecting. |
| public ApplyResult | Returns: what was applied, and what was not — seeBibChange#applyPerforms |
| public boolean | |
| public ChangeSet |
| changes | back to summary |
|---|---|
| private final List<BibChange> changes | |
| name | back to summary |
|---|---|
| private final String name | |
| CompoundEdit | back to summary |
|---|---|
public CompoundEdit(String name)
| |
| addAll | back to summary |
|---|---|
| public void addAll(Collection<FieldChange> fieldChanges) | |
| addEdit | back to summary |
|---|---|
| public void addEdit(BibChange change) | |
| addEdit | back to summary |
|---|---|
| public void addEdit(Optional<FieldChange> change) Records a field change if one happened. An empty | |
| addEdit | back to summary |
|---|---|
| public void addEdit(FieldChange change) | |
| addEdit | back to summary |
|---|---|
| public void addEdit(CompoundEdit nested) Folds another recorder in as a nested change, so one user action stays one undo step even when a command delegates its collecting. | |
| applyEdit | back to summary |
|---|---|
| public ApplyResult applyEdit(BibChange change) Performs No lock, unlike the manager's method: a recorder belongs to the thread running its block, and nothing it collects is reachable from another thread until the block ends.
| |
| hasEdits | back to summary |
|---|---|
| public boolean hasEdits() | |
| toChangeSet | back to summary |
|---|---|
| public ChangeSet toChangeSet() | |