When a library is modified externally, the group diff is very small.
To reproduce:
- Create a new library with a few groups and assign some entries to them
- Outside of JabRef, open the bib file in a text editor, scroll down to the end of JabRef and modify the group structure, e.g., change the group name or add new group by copy and paste
- Wait for the dialog "This library has been modified by another program"
- Click on Review Changes
- See the metadata like in the screenshot

The line "Modified groups tree" is generated from the object org.jabref.logic.bibtex.comparator.GroupDiff. This class should be refined to show a "real" diff (which is then somehow passed via org.jabref.gui.collab.DatabaseChange#setChangeName inside GroupDiff).
The second block with Optional is originating by simply outputting the list of differences and each old and new object with toString(). Since the group diff is handled explicitly (by org.jabref.logic.bibtex.comparator.MetaDataDiff#getGroupDifferences) and implicilty by the list org.jabref.logic.bibtex.comparator.MetaDataDiff#getDifferences it currently appears twice. (org.jabref.gui.collab.DatabaseChangeList#compareAndGetChanges)
The groupDiff should be removed from MetaDataDiff and handled in org.jabref.gui.collab.DatabaseChangesResolverDialog.
Ideas:
- Simple text highlight of the diff. See org.jabref.gui.mergeentries.DiffHighlighting for ideas
- Create a real diff for groups (enhanced
GroupDiff) and a UI to handle that
- Convert group structure to JSON, offer RichTextEditor for JSON. Convert JSON back to group structure. Use web technologies to handle the JSON and the diff. Embed the html page inside a WebView used. (Use some JavaScript library to handle JSON diffs.)
When a library is modified externally, the group diff is very small.
To reproduce:
The line "Modified groups tree" is generated from the object
org.jabref.logic.bibtex.comparator.GroupDiff. This class should be refined to show a "real" diff (which is then somehow passed via org.jabref.gui.collab.DatabaseChange#setChangeName inside GroupDiff).The second block with
Optionalis originating by simply outputting the list of differences and each old and new object withtoString(). Since the group diff is handled explicitly (by org.jabref.logic.bibtex.comparator.MetaDataDiff#getGroupDifferences) and implicilty by the listorg.jabref.logic.bibtex.comparator.MetaDataDiff#getDifferencesit currently appears twice. (org.jabref.gui.collab.DatabaseChangeList#compareAndGetChanges)The groupDiff should be removed from
MetaDataDiffand handled inorg.jabref.gui.collab.DatabaseChangesResolverDialog.Ideas:
GroupDiff) and a UI to handle that