Fix Cleanup, LastOpenedFiles and XMP reset and import#15874
Conversation
Review Summary by QodoFix preferences reset, import, and cleanup migration
WalkthroughsDescription• Fixed reset and import functionality for CleanupPreferences, LastFilesOpenedPreferences, and XmpPreferences • Migrated preferences to use factory methods and setAll patterns for proper state management • Removed unused CliPreferences injection from SavingPropertiesView • Added default preference values and region comments for code organization • Fixed preference migration to handle missing keys with proper defaults Diagramflowchart LR
A["Preferences Classes<br/>Cleanup, LastFiles, Xmp"] -->|"Add getDefault()<br/>and setAll()"| B["Factory Methods"]
B -->|"Use in clear()"| C["Reset Functionality"]
B -->|"Use in import()"| D["Import Functionality"]
E["JabRefCliPreferences"] -->|"Remove getDefaultCleanupPreset()"| F["Simplified API"]
G["SavingPropertiesView"] -->|"Remove CliPreferences injection"| H["Cleaner Dependencies"]
File Changes1. jabgui/src/main/java/org/jabref/gui/libraryproperties/saving/SavingPropertiesView.java
|
Code Review by Qodo
1.
|
| lastFilesOpened = defaults.getLastFilesOpened(); | ||
| } | ||
|
|
||
| Path lastFocused = null; |
There was a problem hiding this comment.
Nice - I hope this will work (again) after this PR.
There was a problem hiding this comment.
Qodo says yes, and i did test it manually. So i hope so too. Otherweise there will be a followup PR.
koppor
left a comment
There was a problem hiding this comment.
some small questions - but we could merge as is.
* upstream/main: (22 commits) Chore(deps): Bump com.github.andygoossens:gradle-modernizer-plugin from 1.13.0 to 1.14.0 in /build-logic (#15922) Chore(deps): Bump jablib/src/main/resources/csl-styles from `5bb8c99` to `e98c9e1` (#15900) Add ability to view citation previews on hover in 'Citations' tab (#15914) Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (#15925) Chore(deps): Bump org.glassfish.grizzly:grizzly-bom in /versions (#15923) Chore(deps): Bump com.uber.nullaway:nullaway in /versions (#15924) SLR : Added performRawSearchQuery to Search Based Fetcher interface (#15916) Fix typos in .jbang/JabKitLauncher.java (#15919) Fix permission (#15918) New Crowdin updates (#15912) Harden CAYWResource against XSS and other security issues (#15868) Fix Cleanup, LastOpenedFiles and XMP reset and import (#15874) Add guard blocking PowerShell here-strings in Bash git commits (#15898) Fix ImporterPreferences reset and import (#15908) Chore(deps): Bump com.uber.nullaway:nullaway in /versions (#15906) Fix: Preserve field focus when navigating entries with keyboard shortcuts (#14943) (#15732) Localization consitency for some of the keys (#15824) chore(deps): update dependency org.glassfish.grizzly:grizzly-http-server to v5.0.2 (#15911) chore(deps): update dependency org.glassfish.grizzly:grizzly-framework to v5.0.2 (#15910) Chore(deps): Bump net.ltgt.nullaway from 3.0.0 to 3.1.0 in /jablib (#15905) ...
Related issues and pull requests
Follow-up to #15870
PR Description
Migrated Cleanup, LastFilesOpened and XmpPreferences
Fixed and added region comments
Steps to test
Run JabRef
Open Preferences
Mess around with preferences
Save
Reopen
Reset
See preferences reset
AI usage
Claude Code (model claude-sonnet-4-6)
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)