Skip to content

Refactor SpecialFieldsPreferences to support reset/reload (#14409)#14508

Merged
calixtus merged 1 commit intoJabRef:mainfrom
shubhamk0205:fix-for-issue-14409
Dec 3, 2025
Merged

Refactor SpecialFieldsPreferences to support reset/reload (#14409)#14508
calixtus merged 1 commit intoJabRef:mainfrom
shubhamk0205:fix-for-issue-14409

Conversation

@shubhamk0205
Copy link
Copy Markdown
Contributor

Closes #14409

Refactored SpecialFieldsPreferences to follow the same pattern as WorkspacePreferences (PR #13894), enabling proper reset and reload functionality. Added a private default constructor, getDefault() static method, and setAll() method to SpecialFieldsPreferences. Updated JabRefGuiPreferences to use the new getSpecialFieldsPreferencesFromBackingStore() method and integrated reset/reload support in clear() and importPreferences() methods.

Steps to test

  1. Test preference reset:

    • Open JabRef
    • Go to Preferences and change the "Special Fields" setting (if available in the UI)
    • Reset preferences (via menu or programmatically)
    • Verify that the Special Fields preference resets to its default value (enabled/true)
  2. Test preference import:

    • Export your current preferences to a file
    • Modify the exported preferences file to change the specialFieldsEnabled value
    • Import the modified preferences file back into JabRef
    • Verify that the Special Fields preference reflects the imported value
  3. Verify normal operation:

    • Ensure that changing the Special Fields preference in the UI still works correctly
    • Verify that the preference persists after restarting JabRef

Mandatory checks

Copy link
Copy Markdown
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be good. Requesting a second review.

@koppor koppor added the status: awaiting-second-review For non-trivial changes label Dec 3, 2025
@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: awaiting-second-review For non-trivial changes labels Dec 3, 2025
@koppor koppor requested a review from calixtus December 3, 2025 21:43
@koppor koppor added status: awaiting-second-review For non-trivial changes and removed status: changes-required Pull requests that are not yet complete labels Dec 3, 2025
@calixtus calixtus enabled auto-merge December 3, 2025 22:12
@calixtus calixtus added this pull request to the merge queue Dec 3, 2025
Merged via the queue into JabRef:main with commit fbd101c Dec 3, 2025
82 of 94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable resetting of SpecialFieldsPreferences

3 participants