Verified Owner
Top Fields Constructors Methods
org.jabref.gui.edit.automaticfieldeditor

public Class AutomaticFieldEditorViewModel

extends AbstractViewModel
Class Inheritance
Imports
javafx.collections.FXCollections, .ObservableList, org.jabref.gui.AbstractViewModel, .DialogService, .StateManager, org.jabref.gui.edit.automaticfieldeditor.clearcontent.ClearContentTabView, org.jabref.gui.edit.automaticfieldeditor.copyormovecontent.CopyOrMoveFieldContentTabView, org.jabref.gui.edit.automaticfieldeditor.editfieldcontent.EditFieldContentTabView, org.jabref.gui.edit.automaticfieldeditor.renamefield.RenameFieldTabView, org.jabref.logic.l10n.Localization, org.jabref.logic.undo.UndoManager, org.jabref.model.database.BibDatabase, org.jabref.model.undo.CompoundEdit

Field Summary

Modifier and TypeField and Description
private final CompoundEdit
dialogEdits

One step for the whole dialog: every tab records into this, and OK pushes it as a single undo entry.

private final ObservableList<AutomaticFieldEditorTab>
private final UndoManager

Constructor Summary

AccessConstructor and Description
public
AutomaticFieldEditorViewModel(BibDatabase database, UndoManager undoManager, DialogService dialogService, StateManager stateManager)

Method Summary

Modifier and TypeMethod and Description
public void
cancelChanges()

Reverts what the tabs already wrote to the library, without recording anything.

public ObservableList<AutomaticFieldEditorTab>
public void

Field Detail

dialogEditsback to summary
private final CompoundEdit dialogEdits

One step for the whole dialog: every tab records into this, and OK pushes it as a single undo entry. Named after the dialog, because that is what the user acted in.

fieldEditorTabsback to summary
private final ObservableList<AutomaticFieldEditorTab> fieldEditorTabs
undoManagerback to summary
private final UndoManager undoManager

Constructor Detail

AutomaticFieldEditorViewModelback to summary
public AutomaticFieldEditorViewModel(BibDatabase database, UndoManager undoManager, DialogService dialogService, StateManager stateManager)

Method Detail

cancelChangesback to summary
public void cancelChanges()

Reverts what the tabs already wrote to the library, without recording anything.

The one deliberate write outside the journal, and it stays outside on purpose: nothing was ever pushed — saveChanges is what pushes — so there is no undo step to reverse and none to add. Cancelling leaves the library where it was before the dialog opened, which is exactly the state the top of the undo stack already describes.

getFieldEditorTabsback to summary
public ObservableList<AutomaticFieldEditorTab> getFieldEditorTabs()
saveChangesback to summary
public void saveChanges()