Fix markbaseChanged for "imported entries"#15610
Conversation
…mportEntriesAction The group creation now runs as a post-open action on the ParserResult before the GUI sets up, rather than on every active-database change. isActionNecessary checks both the preference and whether the group already exists; performAction creates the root group if absent and inserts the import group at position 0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review Summary by QodoFix unwanted modification marker for imported entries group
WalkthroughsDescription• Move "imported entries" group creation to post-open action • Prevent unwanted database modification marker when importing • Simplify active database setter with Optional.ofNullable • Remove duplicate group creation logic from view model Diagramflowchart LR
A["File Opening"] -->|ParserResult| B["AddGroupImportEntriesAction"]
B -->|isActionNecessary| C{"Check preference<br/>and group exists"}
C -->|Yes| D["performAction:<br/>Create group at position 0"]
D -->|Update MetaData| E["Database loaded<br/>without modification marker"]
C -->|No| E
F["GroupTreeViewModel"] -->|Removed| G["addGroupImportEntries logic"]
File Changes1. jabgui/src/main/java/org/jabref/gui/JabRefGuiStateManager.java
|
Code Review by Qodo
1.
|
|
address the qodo points |
…rity * upstream/main: (204 commits) New Crowdin updates (JabRef#15669) Fix OpenRewrite (JabRef#15670) Udpate heylogs (and fix CHANGELOG.md) (JabRef#15671) Improve security and prevent shell injection for push2applications (JabRef#15628) Fix depdency analysis (JabRef#15668) Always use CI-local "gradle", instead of gradlew (JabRef#15667) Change OpenRewrite task to use rewriteDryRun (JabRef#15664) Add small documentation to parameter (JabRef#15666) Fix markbaseChanged for "imported entries" (JabRef#15610) Add forgotten --fresh chore(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3.2.4 (JabRef#15662) chore(deps): update jackson monorepo to v3.1.3 (JabRef#15659) chore(deps): update dependency org.glassfish.hk2:hk2-utils to v4.0.1 (JabRef#15657) chore(deps): update dependency org.glassfish.hk2:hk2-locator to v4.0.1 (JabRef#15656) fix gemsfx missing icon resolving (JabRef#15655) chore(deps): update dependency org.glassfish.hk2:hk2-api to v4.0.1 (JabRef#15654) chore(deps): update dependency org.postgresql:postgresql to v42.7.11 (JabRef#15634) Chore(deps): Bump tools.jackson:jackson-bom in /versions (JabRef#15653) Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (JabRef#15652) Chore(deps): Bump com.dlsc.gemsfx:gemsfx in /versions (JabRef#15651) ...
Follow-up to #14398
The code was at the very wrong place - it needs to be at org.jabref.gui.importer.actions.GUIPostOpenAction.
Otherwise, there is always a
*.The main reason for the
*is that we create a fake BibDatabaseContext while opening. Maybe, will be fixed at #8298.I used Claude Caude for the details, but I made the decisions.
Steps to test
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)