Skip to content

Conversation

@2400031832
Copy link

Closes #14409

This PR implements the resetting functionality for SpecialFieldsPreferences as described in issue #14400.

Changes Made

SpecialFieldsPreferences.java

  • Added private default constructor with default value (specialFieldsEnabled = true)
  • Added static getDefault() method to create default preferences instance
  • Added setAll() method to reset preferences from another instance

JabRefGuiPreferences.java

  • Added getSpecialFieldsPreferences().setAll(SpecialFieldsPreferences.getDefault()) call in the clear() method
  • Added getSpecialFieldsPreferencesFromBackingStore() helper method
  • Added reset handling in the importPreferences() method

Mandatory Checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)

- Added private default constructor with default specialFieldsEnabled = true
- Added static getDefault() method to create default preferences
- Added setAll() method to reset preferences from another instance

Fixes JabRef#14409
…erences()

- Added getSpecialFieldsPreferences().setAll() call in clear() method
- Added getSpecialFieldsPreferencesFromBackingStore() helper method
- Added reset handling in importPreferences() method

Fixes JabRef#14409
@github-actions
Copy link
Contributor

Hey @2400031832!

Thank you for contributing to JabRef! Your help is truly appreciated ❤️

We have automated checks in place, based on which you will soon get feedback if any of them are failing. In a while, maintainers will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs.

Please re-check our contribution guide in case of any other doubts related to our contribution workflow.

@jabref-machine
Copy link
Collaborator

You have removed the "Mandatory Checks" section from your pull request description. Please adhere to our pull request template.

@jabref-machine
Copy link
Collaborator

Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of [x] (done), [ ] (not done yet) or [/] (not applicable).

@jabref-machine
Copy link
Collaborator

Your code currently does not meet JabRef's code guidelines. IntelliJ auto format covers some cases. There seem to be issues with your code style and autoformat configuration. Please reformat your code (Ctrl+Alt+L) and commit, then push.

In special cases, consider using // formatter:off and // formatter:on annotations to allow deviation from the code style.


getWorkspacePreferences().setAll(WorkspacePreferences.getDefault());
getGuiPreferences().setAll(CoreGuiPreferences.getDefault());
getSpecialFieldsPreferences().setAll(SpecialFieldsPreferences.getDefault());
Copy link
Member

Choose a reason for hiding this comment

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

sthgs off with your identation setting

@subhramit
Copy link
Member

Closing PR due to high % of ai usage and changed mandatory checks in PR description (which is also ai generated)

@subhramit subhramit closed this Nov 27, 2025
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

4 participants