-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Refactor EntryEvents - removal part #5410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
80e8377
48cb7fd
923b40e
a0ffcb5
b08ae88
3a830a8
4e57a46
b990e0d
3122e67
aac840c
90c27f1
a0cafc4
868deed
2afb868
460f44a
f11389e
f535a0b
77ff450
b0805cc
7ac7a1c
8255ad2
3b8dfea
5f1b811
c41dc17
bb88484
4c97c64
30d8d51
5cf5965
1df2869
0f5d76f
13abf0c
17f04b0
214e958
a90c44e
648c5da
b0f585a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,7 @@ | |
| import org.jabref.gui.duplicationFinder.DuplicateResolverDialog.DuplicateResolverType; | ||
| import org.jabref.gui.undo.NamedCompound; | ||
| import org.jabref.gui.undo.UndoableInsertEntry; | ||
| import org.jabref.gui.undo.UndoableRemoveEntry; | ||
| import org.jabref.gui.undo.UndoableRemoveEntries; | ||
| import org.jabref.gui.util.BackgroundTask; | ||
| import org.jabref.gui.util.DefaultTaskExecutor; | ||
| import org.jabref.logic.bibtex.DuplicateCheck; | ||
|
|
@@ -162,10 +162,8 @@ private void handleDuplicates(DuplicateSearchResult result) { | |
| final NamedCompound compoundEdit = new NamedCompound(Localization.lang("duplicate removal")); | ||
| // Now, do the actual removal: | ||
| if (!result.getToRemove().isEmpty()) { | ||
| for (BibEntry entry : result.getToRemove()) { | ||
| panel.getDatabase().removeEntry(entry); | ||
| compoundEdit.addEdit(new UndoableRemoveEntry(panel.getDatabase(), entry)); | ||
| } | ||
| compoundEdit.addEdit(new UndoableRemoveEntries(panel.getDatabase(), new ArrayList<>(result.getToRemove()))); | ||
|
||
| panel.getDatabase().removeEntries(new ArrayList<>(result.getToRemove())); | ||
|
||
| panel.markBaseChanged(); | ||
| } | ||
| // and adding merged entries: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package org.jabref.logic.shared.event; | ||
|
|
||
| import org.jabref.model.entry.BibEntry; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * A new {@link SharedEntriwaNotPresentEvent} is fired, when the user tries to push changes of an obsolete | ||
| * {@link BibEntry} to the server. | ||
| */ | ||
| public class SharedEntriesNotPresentEvent { | ||
|
|
||
| private final List<BibEntry> bibEntries; | ||
|
|
||
| /** | ||
| * @param bibEntries Affected {@link BibEntry} | ||
| */ | ||
| public SharedEntriesNotPresentEvent(List<BibEntry> bibEntries) { | ||
| this.bibEntries = bibEntries; | ||
| } | ||
|
|
||
| public List<BibEntry> getBibEntries() { | ||
| return this.bibEntries; | ||
| } | ||
| } |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.