Top Fields Constructors Methods
org.jabref.gui.collab

public Class DatabaseChangesResolverDialog

extends BaseDialog<Boolean>
Class Inheritance
Imports
java.util.HashMap, .List, .Map, javax.swing.undo.UndoManager, javafx.beans.property.SimpleStringProperty, javafx.fxml.FXML, javafx.scene.control.Button, .SelectionMode, .TableColumn, .TableView, javafx.scene.layout.BorderPane, org.jabref.gui.DialogService, .StateManager, org.jabref.gui.preview.PreviewViewer, org.jabref.gui.theme.ThemeManager, org.jabref.gui.util.BaseDialog, .TaskExecutor, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntryTypesManager, org.jabref.preferences.PreferencesService, com.airhacks.afterburner.views.ViewLoader, com.tobiasdiez.easybind.EasyBind, jakarta.inject.Inject, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private Button
private BorderPane
private TableColumn<DatabaseChange, String>
private final List<DatabaseChange>
private TableView<DatabaseChange>
private final BibDatabaseContext
private final Map<DatabaseChange, DatabaseChangeDetailsView>
DETAILS_VIEW_CACHE

Reconstructing the details view to preview an DatabaseChange every time it's selected is a heavy operation.

private DialogService
private BibEntryTypesManager
private static final Logger
private PreferencesService
private StateManager
private TaskExecutor
private ThemeManager
private UndoManager
private ExternalChangesResolverViewModel

Constructor Summary

AccessConstructor and Description
public
DatabaseChangesResolverDialog(List<DatabaseChange>
The list of changes
changes
,
BibDatabaseContext
The database to apply the changes to
database
,
String dialogTitle)

A dialog going through given changes, which are diffs to the provided database.

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
public boolean
public void
public void
private void

Field Detail

areAllChangesAcceptedback to summary
private boolean areAllChangesAccepted
areAllChangesDeniedback to summary
private boolean areAllChangesDenied
askUserToResolveChangeButtonback to summary
private Button askUserToResolveChangeButton
Annotations
@FXML
changeInfoPaneback to summary
private BorderPane changeInfoPane
Annotations
@FXML
changeNameback to summary
private TableColumn<DatabaseChange, String> changeName
Annotations
@FXML
changesback to summary
private final List<DatabaseChange> changes
changesTableViewback to summary
private TableView<DatabaseChange> changesTableView
Annotations
@FXML
databaseback to summary
private final BibDatabaseContext database
DETAILS_VIEW_CACHEback to summary
private final Map<DatabaseChange, DatabaseChangeDetailsView> DETAILS_VIEW_CACHE

Reconstructing the details view to preview an DatabaseChange every time it's selected is a heavy operation. It is also useless because changes are static and if the change data is static then the view doesn't have to change either. This cache is used to ensure that we only create the detail view instance once for each DatabaseChange.

dialogServiceback to summary
private DialogService dialogService
Annotations
@Inject
entryTypesManagerback to summary
private BibEntryTypesManager entryTypesManager
Annotations
@Inject
LOGGERback to summary
private static final Logger LOGGER
preferencesServiceback to summary
private PreferencesService preferencesService
Annotations
@Inject
stateManagerback to summary
private StateManager stateManager
Annotations
@Inject
taskExecutorback to summary
private TaskExecutor taskExecutor
Annotations
@Inject
themeManagerback to summary
private ThemeManager themeManager
Annotations
@Inject
undoManagerback to summary
private UndoManager undoManager
Annotations
@Inject
viewModelback to summary
private ExternalChangesResolverViewModel viewModel

Constructor Detail

DatabaseChangesResolverDialogback to summary
public DatabaseChangesResolverDialog(List<DatabaseChange> changes, BibDatabaseContext database, String dialogTitle)

A dialog going through given changes, which are diffs to the provided database. Each accepted change is written to the provided database.

Parameters
changes:List<DatabaseChange>

The list of changes

database:BibDatabaseContext

The database to apply the changes to

Method Detail

acceptChangesback to summary
public void acceptChanges()
Annotations
@FXML
areAllChangesAcceptedback to summary
public boolean areAllChangesAccepted()
areAllChangesDeniedback to summary
public boolean areAllChangesDenied()
askUserToResolveChangeback to summary
public void askUserToResolveChange()
Annotations
@FXML
denyChangesback to summary
public void denyChanges()
Annotations
@FXML
initializeback to summary
private void initialize()
Annotations
@FXML