-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add confirmation dialog for empty entries in JabRef #8218
Merged
Merged
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
55be347
Create EmptyEntryCleanup.java
ruoyu-qian ef96463
Update CleanupWorker.java
ruoyu-qian 572a345
Update CleanupPreset.java
ruoyu-qian 274b357
Update BibDatabaseContext.java
ruoyu-qian 3985260
Add function showEmptyEntryWarning()
ruoyu-qian 518d6fc
Update JabRefFrame.java
ruoyu-qian 932bf8b
Update JabRefFrame.java
ruoyu-qian 05d700a
Update JabRefFrame.java
ruoyu-qian 2a23bad
Update JabRefFrame.java
ruoyu-qian 2e5604a
Update JabRefFrame.java
ruoyu-qian 12137ed
Delete previous change in LibraryTab.java
ruoyu-qian 61a8144
Delete previous change in CleanupPreset.java
ruoyu-qian e8ea0b2
Delete previous change in CleanupWorker.java
ruoyu-qian f0dce18
Delete EmptyEntryCleanup.java
ruoyu-qian 440bb42
Update CHANGELOG.md
ruoyu-qian 1d58043
Update CHANGELOG.md
ruoyu-qian 554ed0d
Update JabRef_en.properties
ruoyu-qian f711365
Update CHANGELOG.md
ruoyu-qian e99c931
Update JabRef_en.properties
ruoyu-qian dac8dc9
Update JabRefFrame.java
ruoyu-qian 011091d
Add Unit tests for hasEmptyEntries() in BibDatabaseTest.java
ruoyu-qian 845aa1e
Add Javadoc comment
ruoyu-qian 65ae566
Update BibDatabaseContext.java
ruoyu-qian 6e19d11
Update BibDatabaseTest.java
ruoyu-qian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you create a new array list here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't create a new array list, removing the empty entry from the original array list will lead to out of index error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any other approaches you would recommend? @Siedlerchr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, now I see it. It's because you can't remove an entry from a collection over that you are still iterating. So your solutions is fine.
Please add one more test where you check and verify that the context.getEntries() is indeed entry
e.e.g assertEquals(Collections.emptyList(), context.getEntries())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly.
In
@test withEmptyEntry()
I have added a delete command and a test to check the database is empty after deleting. Would this be sufficient, or would you like me to add a test to actually test the functionconfirmEmptyEntry()
that I added in JabRefFrame.java? Thanks!