use of org.jabref.logic.cleanup.CleanupWorker in project jabref by JabRef.
the class CleanupAction method doCleanup.
/**
* Runs the cleanup on the entry and records the change.
*/
private void doCleanup(CleanupPreset preset, BibEntry entry, NamedCompound ce) {
// Create and run cleaner
CleanupWorker cleaner = new CleanupWorker(panel.getBibDatabaseContext(), preferences.getCleanupPreferences(Globals.journalAbbreviationLoader));
List<FieldChange> changes = cleaner.cleanup(preset, entry);
unsuccessfulRenames = cleaner.getUnsuccessfulRenames();
if (changes.isEmpty()) {
return;
}
// Register undo action
for (FieldChange change : changes) {
ce.addEdit(new UndoableFieldChange(change));
}
}
Aggregations