Skip to content
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

[WIP][GSOC22] - C - Improve the external changes resolver dialog #9021

Merged
merged 497 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
497 commits
Select commit Hold shift + click to select a range
8becfc1
Add the entry type field at the top of the fields list
HoussemNasri Jul 2, 2022
6042d69
Display entry type and bind merged entry
HoussemNasri Jul 2, 2022
390762b
Minor changes
HoussemNasri Jul 2, 2022
91dd860
Style CSS
HoussemNasri Jul 2, 2022
32a9ffb
Update ThreeWayMergeToolbox.fxml
HoussemNasri Jul 2, 2022
0a5fb15
Remove MergeEntries from MergeEntriesDialog
HoussemNasri Jul 2, 2022
4267cf6
Create EmptyCell for optimization
HoussemNasri Jul 2, 2022
ef3271c
Update HeaderCell
HoussemNasri Jul 2, 2022
cac4f11
Rename HeaderView to ThreeWayMergeHeaderView
HoussemNasri Jul 2, 2022
0f3e154
Add buttons to accept all left or right entry changes to ThreeWayMerg…
HoussemNasri Jul 2, 2022
91b9cd9
Disable right field cell when it's not visible
HoussemNasri Jul 2, 2022
d6a7a82
Listen for select all left/right toolbar buttons
HoussemNasri Jul 2, 2022
5a37259
Style stuff
HoussemNasri Jul 2, 2022
3a2f7c4
Add DiffHighlighter
HoussemNasri Jul 2, 2022
48f46c9
Create DiffHighlighter.css
HoussemNasri Jul 2, 2022
6f8d19a
Add left padding to HeaderCell
HoussemNasri Jul 2, 2022
d7f91c3
Move diff highlighting styles to Dark.css
HoussemNasri Jul 2, 2022
4716f4b
Show differences between left and right values using a unified diff view
HoussemNasri Jul 2, 2022
e7817eb
Change MergeEntriesDialog stage style
HoussemNasri Jul 2, 2022
a1f7ac1
Remove BackgroundTone from AbstractCell
HoussemNasri Jul 2, 2022
17787f9
Move CopyFieldValueCommand
HoussemNasri Jul 2, 2022
46fd34e
Make DiffMethod public
HoussemNasri Jul 2, 2022
980a85e
Move CopyFieldValueCommand
HoussemNasri Jul 2, 2022
2ef153b
Implement SplitDiffHighlighter
HoussemNasri Jul 2, 2022
ea56047
Show diffs when user selects "Show Diff" in the toolbar UI
HoussemNasri Jul 2, 2022
8a5b534
Fix bugs in UnifiedDiffHighlighter
HoussemNasri Jul 2, 2022
1a25db6
Style css stuff
HoussemNasri Jul 2, 2022
0cf68c7
Fix typos
HoussemNasri Jul 2, 2022
2142192
Refactor SplitDiffHighlighter and fix bugs
HoussemNasri Jul 2, 2022
868f314
Remove redundant constructor from UnifiedDiffHighlighter
HoussemNasri Jul 2, 2022
a1fb604
Allow users to switch between split and unified diff view
HoussemNasri Jul 2, 2022
6043305
Set left and right headers in MergeEntriesDialog
HoussemNasri Jul 2, 2022
d8d2246
Refactor ThreeWayMergeHeaderView
HoussemNasri Jul 2, 2022
e27d8f9
Remove wellbehavedfx module dependency
HoussemNasri Jun 28, 2022
4891fdc
Delete EmptyCell.java
HoussemNasri Jul 2, 2022
3f57163
Refactor FieldValueCell
HoussemNasri Jul 2, 2022
fb3509e
Use the new merge UI in DuplicateResolverDialog
HoussemNasri Jul 2, 2022
6bb8f2c
Expose an API to change diff view and highlight method from outside t…
HoussemNasri Jul 2, 2022
a9f3254
Use the new merge UI when an entry is changed from external
HoussemNasri Jul 2, 2022
30b4f74
Minor styling
HoussemNasri Jun 29, 2022
7022b74
Remove DiffHighlighter.css stylesheet
HoussemNasri Jul 2, 2022
6fee209
Remove unused dependencies
HoussemNasri Jul 2, 2022
23223de
Allow selecting empty field values
HoussemNasri Jul 2, 2022
f9c4a18
Fix readme :(
HoussemNasri Jul 2, 2022
a5bc689
Use a theme color for selection box background
HoussemNasri Jul 2, 2022
4bd99c2
Refactor FieldValueCell
HoussemNasri Jul 3, 2022
e2d4f76
Add an action to FieldValueCell for opening Urls
HoussemNasri Jul 3, 2022
b8a3575
Add the ability to open DOI identifier
HoussemNasri Jul 3, 2022
28fbefb
Cleanup
HoussemNasri Jul 3, 2022
a471e20
Checkstyle
HoussemNasri Jul 3, 2022
03ee8c0
Improve URL validation logic
HoussemNasri Jul 4, 2022
06df19e
Use DiffMethod in merge toolbar for consistency
HoussemNasri Jul 4, 2022
ddee09c
i18n
Siedlerchr Aug 3, 2022
f69c76c
Cleanup css
HoussemNasri Jul 4, 2022
4f6d227
Remove redundant icon style
HoussemNasri Jul 4, 2022
baeb1dc
Rename style class field-value to merge-field-value
HoussemNasri Jul 4, 2022
9905fe0
Remove old Merge entries UI
HoussemNasri Jul 4, 2022
c37fbd3
Fix missing header styles
HoussemNasri Jul 4, 2022
7dcc348
i18n
Siedlerchr Aug 3, 2022
0434687
Garbage collect right cell when it's invisible
HoussemNasri Jul 6, 2022
a4049ba
Fix typo
HoussemNasri Jul 6, 2022
516ca2f
Create GroupsFieldNameCell
HoussemNasri Jul 9, 2022
c4ff603
Create MergedGroups to record the state of the groups before and afte…
HoussemNasri Jul 9, 2022
8bd1ccb
Create a factory class for creating field name cells
HoussemNasri Jul 9, 2022
6ace504
Perform experiments for implementing groups merging
HoussemNasri Jul 9, 2022
6187c26
Delegate field name cells creation to ThreeWayMergeView
HoussemNasri Jul 9, 2022
8580d35
Improve groups merging function
HoussemNasri Jul 9, 2022
5703cd4
Implement updateFieldValues to redraw the field row when left or righ…
HoussemNasri Jul 9, 2022
4043a6d
Write a draft version of the logic to merge groups
HoussemNasri Jul 9, 2022
9c152c6
Refactoring
HoussemNasri Jul 8, 2022
4bf7b2e
More Refactoring
HoussemNasri Jul 8, 2022
4dceb2e
Merge groups only when left and right entries have different groups
HoussemNasri Jul 8, 2022
8cf5bc4
Add row constraints to fix UI lagging when updating field values
HoussemNasri Jul 8, 2022
ffe4f04
Minor refactoring
HoussemNasri Jul 8, 2022
c7edbe3
Don't merge common groups between left and right entries
HoussemNasri Jul 8, 2022
2f59a69
Refactor GroupsFieldNameCell constructor
HoussemNasri Jul 8, 2022
5ba051b
Allow groups field row to grow in height
HoussemNasri Jul 8, 2022
fcc0667
Fix select all left/right not working properly
HoussemNasri Jul 8, 2022
99dd862
Update diff when a field value changes
HoussemNasri Jul 8, 2022
754d20f
Add the merge icon and style css
HoussemNasri Jul 8, 2022
9561db2
Extract merge and unmerge commands into their own classes
HoussemNasri Jul 8, 2022
b161536
Refactoring
HoussemNasri Jul 9, 2022
1519bb1
Record groups merging operation using CompoundEdit
HoussemNasri Jul 9, 2022
228f56e
Cancel groups merge when user choose 'Cancel' in the merge entries di…
HoussemNasri Jul 9, 2022
a9d7a7f
Make FieldNameCell take only one action
HoussemNasri Jul 9, 2022
2bf5f66
Set groups merge action to MERGE by default
HoussemNasri Jul 9, 2022
7e25fe5
Fix Unmerge button always disabled
HoussemNasri Jul 9, 2022
1af0bc4
Cleanup
HoussemNasri Jul 9, 2022
43f8aca
Almost f**** everything up. I deleted GroupsFieldNameCell content by …
HoussemNasri Jul 9, 2022
9faebb6
Checkstyle
HoussemNasri Jul 9, 2022
650fddf
Remove unused MergedGroups class
HoussemNasri Jul 10, 2022
1a599f5
Register groups merge edit into UndoManager
HoussemNasri Jul 10, 2022
fde0bb7
Cancel merge groups edit in the DuplicateResolverDialog when user cho…
HoussemNasri Jul 10, 2022
008e7ea
i18n
Siedlerchr Aug 3, 2022
5bf4ad9
Introduce ThreeFieldValuesViewModel
HoussemNasri Jul 16, 2022
73ddbc8
Merge clones of left & right entry rather than the original ones
HoussemNasri Jul 16, 2022
d05373b
Optimize imports
HoussemNasri Jul 16, 2022
6522f94
Refactor DuplicateResolverDialog to merge clones of left and right entry
HoussemNasri Jul 16, 2022
b7ab235
Select the other entry groups when one entry has no group
HoussemNasri Jul 16, 2022
4212cc7
Remove unused property
HoussemNasri Jul 17, 2022
c8d47b4
[WIP] Convert ThreeFieldValues to MVVM
HoussemNasri Jul 17, 2022
884aa53
Move business logic to the view-model and update UI via binding
HoussemNasri Jul 18, 2022
ae6babd
Consider equal left and right fields as merged
HoussemNasri Jul 18, 2022
f0c1f1c
Move initial selection code to the view model
HoussemNasri Jul 18, 2022
ae99ef4
Refactor
HoussemNasri Jul 18, 2022
e16ae47
Hide rightValueCell and extend leftValueCell to 2 columns when fields…
HoussemNasri Jul 18, 2022
737045a
Prepare for adding the ability to merge fields other than groups
HoussemNasri Jul 18, 2022
acf63ee
Rename ThreeFieldValues to ThreeFieldValuesView
HoussemNasri Jul 18, 2022
1dfe8a4
Delegate FieldNameCell creation to ThreeFieldValuesView
HoussemNasri Jul 18, 2022
0210d71
Pass Bib entries to ThreeFieldValuesView rather than raw string
HoussemNasri Jul 18, 2022
6a768eb
Move merge/unmerge commands to ThreeFieldValuesView
HoussemNasri Jul 18, 2022
e48bcbe
Bind field value cell text property
HoussemNasri Jul 18, 2022
12e6f40
Create an undoable edit for undoing fields merging
HoussemNasri Jul 18, 2022
75260de
Update bib entries when left and right field value properties change
HoussemNasri Jul 18, 2022
f3efc40
Update left and right field value properties when merging fields rath…
HoussemNasri Jul 18, 2022
6d3e7cd
Unbind MergedFieldValue property because it can't be edited when bound
HoussemNasri Jul 18, 2022
184cd1a
Cleanup
HoussemNasri Jul 18, 2022
874952e
Move merged entry update logic to ThreeFieldValuesViewModel
HoussemNasri Jul 18, 2022
3541cd5
Implement algorithms for merging groups and keywords
HoussemNasri Jul 19, 2022
075da2b
Pass FieldMergerFactory to ThreeFieldValuesView
HoussemNasri Jul 19, 2022
b2ddc8a
Move isMergeableField method to FieldMergerFactory
HoussemNasri Jul 19, 2022
fb40879
Delete cancelGroupsEdit()
HoussemNasri Jul 19, 2022
2c7339a
Fix KeywordMerger implementation
HoussemNasri Jul 19, 2022
11fb4f1
Fix a bug that deselects both fields after they are unmerged
HoussemNasri Jul 19, 2022
ef212c0
Rename 'ThreeFieldValues' to 'FieldRow'
HoussemNasri Jul 19, 2022
3752f16
Cleanup
HoussemNasri Jul 19, 2022
0a8f9d7
Hide diffs when both values are equal
HoussemNasri Jul 19, 2022
6eea335
Fix typos
HoussemNasri Jul 20, 2022
e1667d9
Select LEFT value after merging fields
HoussemNasri Jul 20, 2022
383dd76
Logging
HoussemNasri Jul 20, 2022
2f58d9b
Implement merging comments
HoussemNasri Jul 20, 2022
4aaabf0
Improve groups and keywords merger implementation
HoussemNasri Jul 20, 2022
ecf1eeb
Change merge/unmerge buttons tooltip text based on the field to merge
HoussemNasri Jul 22, 2022
b1e2951
Implement file merging
HoussemNasri Jul 25, 2022
dd8457c
Encode the resulting string from merging files
HoussemNasri Jul 25, 2022
8c3a1e0
Refactor merge/unmerge fields command handling
HoussemNasri Jul 25, 2022
15f3de3
Declare Actions with the builder design pattern
HoussemNasri Jul 25, 2022
eb8429c
Remove MergeableFieldCell dependency from the merge/unmerge commands
HoussemNasri Jul 25, 2022
09b6073
Add logs
HoussemNasri Jul 25, 2022
2ef9a52
Disable field's merge button when field values are equal
HoussemNasri Jul 25, 2022
c3c76cb
Update code documentation
HoussemNasri Jul 25, 2022
4829168
Rename 'AbstractCell' to 'ThreeWayMergeCell'
HoussemNasri Jul 25, 2022
fa3927d
Pass arguments to Localization.lang using '%0' not '%'
HoussemNasri Jul 27, 2022
d707561
Decompose the ToggleMergeUnmergeButton into its own class (or component)
HoussemNasri Jul 27, 2022
94626dc
Include original left and right entries in EntriesMergeResult
HoussemNasri Aug 2, 2022
dc9293d
Make entries merging logic reusable
HoussemNasri Aug 2, 2022
a984a97
Rename ChangeDisplayDialog.java to ExternalChangesResolverDialog.java
HoussemNasri Aug 2, 2022
fce5ff9
Create ExternalChangesResolverViewModel
HoussemNasri Aug 2, 2022
b9d7bc1
Design the ExternalChangesResolverDialog
HoussemNasri Aug 2, 2022
3811561
Implement a method for opening an advanced merge dialog for modified …
HoussemNasri Aug 2, 2022
00722e1
Wrap the UI in a dialog pane
HoussemNasri Aug 2, 2022
ba86932
Convert change name to a StringProperty instead of a raw string
HoussemNasri Aug 2, 2022
1f908f6
Populate table view with changes
HoussemNasri Aug 2, 2022
71c2144
Remove 'Accept changes' and 'Dismiss' buttons from the dialog
HoussemNasri Aug 2, 2022
97a5f1d
Allow selecting multiple changes
HoussemNasri Aug 2, 2022
bad443b
Rename 'Accept Theirs' to 'Accept' and 'Accept Yours' to 'Deny'
HoussemNasri Aug 2, 2022
3b31d58
Apply changes when before the dialog
HoussemNasri Aug 2, 2022
54daebb
Cleanup FXML
HoussemNasri Aug 2, 2022
3e9cd28
Remove old UI code
HoussemNasri Aug 2, 2022
c5599b7
Close dialog when all changes are resolved
HoussemNasri Aug 2, 2022
16bb186
Enable the 'Merge...' button only if the selected change has an advan…
HoussemNasri Aug 3, 2022
263aa60
Select the first change after opening the dialog
HoussemNasri Aug 3, 2022
f0fbd87
Open the advanced merge dialog when 'Merge...' is clicked
HoussemNasri Aug 3, 2022
0d33e57
Don't open the advanced merge dialog when 'makeChange()' is called on…
HoussemNasri Aug 3, 2022
358b235
Display a preview of the deleted entry
HoussemNasri Aug 3, 2022
76f8849
Display information about the selected change in the bottom detail node
HoussemNasri Aug 3, 2022
698b801
Merge branch 'GSOC-improve-collab-dialog' of github.com:JabRef/jabref…
Siedlerchr Aug 3, 2022
20c181c
Merge remote-tracking branch 'upstream/main' into GSOC-fully-function…
Siedlerchr Aug 3, 2022
d43c3f9
Merge branch 'GSOC-fully-functional-three-way-merge' into GSOC-merge-…
HoussemNasri Aug 3, 2022
eaad5ee
Merge branch 'GSOC-merge-groups' into GSOC-improve-collab-dialog
HoussemNasri Aug 3, 2022
aa48379
Use Infinity in FXML instead of an exponential number
HoussemNasri Aug 6, 2022
a3e38c8
Inject dependencies in constructor
HoussemNasri Aug 6, 2022
0a0d717
Pass parameters to 'Localization.lang' instead of concatenation
HoussemNasri Aug 6, 2022
21e5f03
Rename change column from 'Name' to 'Change'
HoussemNasri Aug 7, 2022
8776241
Remove obsolete localization keys
HoussemNasri Aug 7, 2022
50f177c
Preview the new entry state in the details pane when an entry is modi…
HoussemNasri Aug 7, 2022
a322a39
Merge branch 'main' into GSOC-improve-collab-dialog
HoussemNasri Aug 7, 2022
61dae4b
Merge remote-tracking branch 'upstream/GSOC-improve-collab-dialog' in…
HoussemNasri Aug 7, 2022
1b75e49
Register advanced changes made from the advanced merge dialog
HoussemNasri Aug 7, 2022
91c5084
Use to accept property in DatabaseChangeViewModel to decide which cha…
HoussemNasri Aug 7, 2022
a7afc31
Use 'BibDatabase#insertEntry' instead of 'JabRefFrame#insert' to inse…
HoussemNasri Aug 7, 2022
4663152
Don't override 'setAccepted()' in EntryChangeViewModel
HoussemNasri Aug 7, 2022
88d3488
Remove unused JabRefFrame constructor argument
HoussemNasri Aug 7, 2022
38f7137
Convert ExternalChangesResolverDialog to MVVM
HoussemNasri Aug 8, 2022
eb2e29b
Select first change
HoussemNasri Aug 8, 2022
a2f6508
Configure advanced entry change resolver/merger dialog
HoussemNasri Aug 8, 2022
6a0ce61
Progress toward converting the collab package to MVVM
HoussemNasri Aug 8, 2022
48d7944
Move experimental code into the same package
HoussemNasri Aug 10, 2022
456c580
Merge remote-tracking branch 'upstream/main' into GSOC-improve-collab…
HoussemNasri Aug 10, 2022
85c5bc6
Commit
HoussemNasri Aug 10, 2022
12adbd3
Merge branch 'main' into GSOC-improve-collab-dialog
HoussemNasri Aug 10, 2022
3ecaba4
Checkstyle
HoussemNasri Aug 10, 2022
fa62312
Checkstyle
HoussemNasri Aug 10, 2022
da9eeb9
l10n
HoussemNasri Aug 10, 2022
ca4e99c
Remove FieldRowController.java
HoussemNasri Aug 11, 2022
041644d
Remove the selected changes from the view model to prevent bugs
HoussemNasri Aug 15, 2022
66c7b31
Don't pass the selected change because it is already available in the…
HoussemNasri Aug 15, 2022
8c720aa
Fix change produced by the advanced merge dialog not applied
HoussemNasri Aug 15, 2022
2a56d43
Cleanup
HoussemNasri Aug 16, 2022
0791654
Merge remote-tracking branch 'upstream/main' into GSOC-improve-collab…
HoussemNasri Aug 16, 2022
9b0440d
[WIP] Refactor the external change resolver component
HoussemNasri Aug 17, 2022
71049ac
[WIP] still working
HoussemNasri Aug 18, 2022
a1b1bd6
Rename 'changes' to 'visibleChanges' and 'immutableChanges' to 'changes'
HoussemNasri Aug 18, 2022
3ed0872
Pass 'oldEntry' and 'newEntry' to EntryChange
HoussemNasri Aug 18, 2022
d2167f6
Initialize the preview of an Entry change
HoussemNasri Aug 18, 2022
3e1bcdb
Prevent NullPointerException when the change has no resolver
HoussemNasri Aug 18, 2022
00ac21a
Implement EntryChangeResolver#askUserToResolveChange
HoussemNasri Aug 18, 2022
d665ba1
Cleanup
HoussemNasri Aug 18, 2022
31fd3e7
Pass EntryChange to EntryChangeResolver
HoussemNasri Aug 18, 2022
0735488
Add accept() method to ExternalChange
HoussemNasri Aug 18, 2022
4d21f05
Integrate the experiment design into ExternalChangesResolverDialog
HoussemNasri Aug 18, 2022
64a7264
pass undoEdit to applyChange method
HoussemNasri Aug 18, 2022
16de88f
Make ExternalChangeResolver#askUserToResolveChange return an Optional
HoussemNasri Aug 18, 2022
b2fda9e
Fix compilation errors by replacing DatabaseChangeViewModel by Extern…
HoussemNasri Aug 18, 2022
e48d115
Remove undoEdit field from ExternalChangeResolver
HoussemNasri Aug 18, 2022
6c38c6a
Pass a BibDatabaseContext to ExternalChangeResolverFactory
HoussemNasri Aug 18, 2022
2c192c2
Pass required dependencies to ExternalChangeDetailsViewFactory
HoussemNasri Aug 18, 2022
07ea3e0
Fix typo
HoussemNasri Aug 18, 2022
6f9a9bb
Remove debugging junk
HoussemNasri Aug 18, 2022
e38b47e
Removed unused import
HoussemNasri Aug 18, 2022
82846d7
Remove EntryChangeDetailsViewModel.java because it's useless
HoussemNasri Aug 18, 2022
ca2a662
Handle EntryAdd changes in the new design
HoussemNasri Aug 18, 2022
92e4631
Cleanup
HoussemNasri Aug 18, 2022
6d1aa4b
Set dialog title and cleanup
HoussemNasri Aug 19, 2022
8fc15ee
Integrate EntryDelete changes into the new design
HoussemNasri Aug 19, 2022
2949fe4
Integrate StringAdd changes into the new design
HoussemNasri Aug 19, 2022
3268ec6
Integrate StringDelete changes into the new design
HoussemNasri Aug 19, 2022
4ecefa7
Integrate StringChange changes into the new design
HoussemNasri Aug 19, 2022
f0ed23a
Integrate StringRename changes into the new design
HoussemNasri Aug 19, 2022
d96a13b
Integrate MetadataChange changes into the new design
HoussemNasri Aug 19, 2022
fedf4d8
Integrate GroupChange changes into the new design
HoussemNasri Aug 19, 2022
478a58d
Integrate PreambleChange changes into the new design
HoussemNasri Aug 19, 2022
4c376fa
It's done 🎉
HoussemNasri Aug 19, 2022
edd0143
I10n
HoussemNasri Aug 19, 2022
579525a
Fix typo in registering entry change edits
HoussemNasri Aug 19, 2022
f595161
Register edits into UndoManager
HoussemNasri Aug 19, 2022
8fcd0b1
Add a TODO for undoing metadata edit
HoussemNasri Aug 19, 2022
8034e75
Log the number of cached web view instances in WebViewStore
HoussemNasri Aug 19, 2022
61872df
Cache external change details views
HoussemNasri Aug 19, 2022
620f9b4
Update CHANGELOG.md
HoussemNasri Aug 19, 2022
ce12f11
Refine dialog size and divider position
HoussemNasri Aug 22, 2022
ae3736a
Update src/main/java/org/jabref/gui/collab/stringadd/StringAdd.java
HoussemNasri Aug 23, 2022
52cecf5
Use parametrized localization
HoussemNasri Aug 24, 2022
35ed6dd
Remove Undo
HoussemNasri Aug 24, 2022
9800ca4
Use computeIfAbsent to lookup cached details views
HoussemNasri Aug 26, 2022
4fe10bd
Rename 'String' to 'BibTexString'
HoussemNasri Aug 26, 2022
e50a051
Update src/main/java/org/jabref/gui/collab/ExternalChange.java
HoussemNasri Aug 29, 2022
8e55de3
Use debug() for logging events not of interest for the average user
HoussemNasri Aug 29, 2022
b1237be
Remove ExternalChangeDetailsViewModel.java
HoussemNasri Aug 29, 2022
593dcca
Collapse unused else
HoussemNasri Aug 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We improved the Citavi Importer to also import so called Knowledge-items into the field `comment` of the corresponding entry [#9025](https://github.com/JabRef/jabref/issues/9025)
- We removed wrapping of string constants when writing to a `.bib` file.
- We changed the button label from "Return to JabRef" to "Return to library" to better indicate the purpose of the action.
- We reworked the External Changes Resolver dialog. [#9021](https://github.com/JabRef/jabref/pull/9021)

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ private MenuBar createMenu() {

quality.getItems().addAll(
factory.createMenuItem(StandardActions.FIND_DUPLICATES, new DuplicateSearch(this, dialogService, stateManager)),
factory.createMenuItem(StandardActions.MERGE_ENTRIES, new MergeEntriesAction(this, dialogService, stateManager)),
factory.createMenuItem(StandardActions.MERGE_ENTRIES, new MergeEntriesAction(dialogService, stateManager)),
factory.createMenuItem(StandardActions.CHECK_INTEGRITY, new IntegrityCheckAction(this, stateManager, Globals.TASK_EXECUTOR)),
factory.createMenuItem(StandardActions.CLEANUP_ENTRIES, new CleanupAction(this, this.prefs, dialogService, stateManager)),

Expand Down
114 changes: 0 additions & 114 deletions src/main/java/org/jabref/gui/collab/ChangeDisplayDialog.java

This file was deleted.

45 changes: 30 additions & 15 deletions src/main/java/org/jabref/gui/collab/ChangeScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.collab.entryadd.EntryAdd;
import org.jabref.gui.collab.entrychange.EntryChange;
import org.jabref.gui.collab.entrydelete.EntryDelete;
import org.jabref.gui.collab.groupchange.GroupChange;
import org.jabref.gui.collab.metedatachange.MetadataChange;
import org.jabref.gui.collab.preamblechange.PreambleChange;
import org.jabref.gui.collab.stringadd.BibTexStringAdd;
import org.jabref.gui.collab.stringchange.BibTexStringChange;
import org.jabref.gui.collab.stringdelete.BibTexStringDelete;
import org.jabref.gui.collab.stringrename.BibTexStringRename;
import org.jabref.gui.theme.ThemeManager;
import org.jabref.logic.bibtex.comparator.BibDatabaseDiff;
import org.jabref.logic.bibtex.comparator.BibEntryDiff;
Expand All @@ -31,6 +41,8 @@ public class ChangeScanner {
private final StateManager stateManager;
private final ThemeManager themeManager;

private final ExternalChangeResolverFactory externalChangeResolverFactory;

public ChangeScanner(BibDatabaseContext database,
DialogService dialogService,
PreferencesService preferencesService,
Expand All @@ -41,15 +53,16 @@ public ChangeScanner(BibDatabaseContext database,
this.preferencesService = preferencesService;
this.stateManager = stateManager;
this.themeManager = themeManager;
this.externalChangeResolverFactory = new ExternalChangeResolverFactory(dialogService, database);
}

public List<DatabaseChangeViewModel> scanForChanges() {
public List<ExternalChange> scanForChanges() {
if (database.getDatabasePath().isEmpty()) {
return Collections.emptyList();
}

try {
List<DatabaseChangeViewModel> changes = new ArrayList<>();
List<ExternalChange> changes = new ArrayList<>();

// Parse the modified file
// Important: apply all post-load actions
Expand All @@ -61,10 +74,12 @@ public List<DatabaseChangeViewModel> scanForChanges() {
// Start looking at changes.
BibDatabaseDiff differences = BibDatabaseDiff.compare(database, databaseOnDisk);
differences.getMetaDataDifferences().ifPresent(diff -> {
changes.add(new MetaDataChangeViewModel(diff, preferencesService));
diff.getGroupDifferences().ifPresent(groupDiff -> changes.add(new GroupChangeViewModel(groupDiff)));
changes.add(new MetadataChange(diff, database, externalChangeResolverFactory));
diff.getGroupDifferences().ifPresent(groupDiff -> changes.add(new GroupChange(
groupDiff, database, externalChangeResolverFactory
)));
});
differences.getPreambleDifferences().ifPresent(diff -> changes.add(new PreambleChangeViewModel(diff)));
differences.getPreambleDifferences().ifPresent(diff -> changes.add(new PreambleChange(diff, database, externalChangeResolverFactory)));
differences.getBibStringDifferences().forEach(diff -> changes.add(createBibStringDiff(diff)));
differences.getEntryDifferences().forEach(diff -> changes.add(createBibEntryDiff(diff)));
return changes;
Expand All @@ -74,31 +89,31 @@ public List<DatabaseChangeViewModel> scanForChanges() {
}
}

private DatabaseChangeViewModel createBibStringDiff(BibStringDiff diff) {
if (diff.getOriginalString() == null) {
return new StringAddChangeViewModel(diff.getNewString());
private ExternalChange createBibStringDiff(BibStringDiff diff) {
if (diff.getOriginalString() == null) {
return new BibTexStringAdd(diff.getNewString(), database, externalChangeResolverFactory);
}

if (diff.getNewString() == null) {
return new StringRemoveChangeViewModel(diff.getOriginalString());
return new BibTexStringDelete(diff.getOriginalString(), database, externalChangeResolverFactory);
}

if (diff.getOriginalString().getName().equals(diff.getNewString().getName())) {
return new StringChangeViewModel(diff.getOriginalString(), diff.getNewString());
return new BibTexStringChange(diff.getOriginalString(), diff.getNewString(), database, externalChangeResolverFactory);
}

return new StringNameChangeViewModel(diff.getOriginalString(), diff.getNewString());
return new BibTexStringRename(diff.getOriginalString(), diff.getNewString(), database, externalChangeResolverFactory);
}

private DatabaseChangeViewModel createBibEntryDiff(BibEntryDiff diff) {
private ExternalChange createBibEntryDiff(BibEntryDiff diff) {
if (diff.getOriginalEntry() == null) {
return new EntryAddChangeViewModel(diff.getNewEntry(), preferencesService, dialogService, stateManager, themeManager);
return new EntryAdd(diff.getNewEntry(), database, externalChangeResolverFactory);
}

if (diff.getNewEntry() == null) {
return new EntryDeleteChangeViewModel(diff.getOriginalEntry());
return new EntryDelete(diff.getOriginalEntry(), database, externalChangeResolverFactory);
}

return new EntryChangeViewModel(diff.getOriginalEntry(), diff.getNewEntry());
return new EntryChange(diff.getOriginalEntry(), diff.getNewEntry(), database, externalChangeResolverFactory);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
import java.util.List;

public interface DatabaseChangeListener {
void databaseChanged(List<DatabaseChangeViewModel> changes);
void databaseChanged(List<ExternalChange> changes);
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public DatabaseChangeMonitor(BibDatabaseContext database,
Localization.lang("The library has been modified by another program."),
List.of(new Action(Localization.lang("Dismiss changes"), event -> notificationPane.hide()),
new Action(Localization.lang("Review changes"), event -> {
dialogService.showCustomDialogAndWait(new ChangeDisplayDialog(database, changes));
dialogService.showCustomDialogAndWait(new ExternalChangesResolverDialog(changes, database, dialogService, stateManager, themeManager, preferencesService));
notificationPane.hide();
})),
Duration.ZERO));
Expand Down
54 changes: 0 additions & 54 deletions src/main/java/org/jabref/gui/collab/DatabaseChangeViewModel.java

This file was deleted.

53 changes: 0 additions & 53 deletions src/main/java/org/jabref/gui/collab/EntryAddChangeViewModel.java

This file was deleted.

Loading