-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add button for a user to reset the cite command to the default value. #10580
Conversation
Add button in ExternalTab.fxml and link it to a method in ExternalTabViewModel.java that sets the citeCommandProperty to the specified default value Update CHANGELOG.md
Thanks for your interest in JabRef. The corresponding issue is very new, we should discuss it before merging this PR. See my comment: #10569 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice and clean implementation.
+1 from my side. Just a minor thing.
// Reset Cite Command | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment can be removed, because the method name says the same.
// Reset Cite Command | ||
|
||
public void resetCiteCommandToDefault() { | ||
this.citeCommandProperty.setValue(preferences.getDefaults().get(JabRefPreferences.CITE_COMMAND).toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be better to have this encapsulated in the ExternalApplicationPreferences, e.g. a method
getDefaultCitecommand. Have a look at the PreviewPreferences to see how it's done there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is probably not a blocker for this PR since this change will anyway be part of a future PR improving all the preferences objects carry their own defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just read this. I still changed both requested Changes
Delete redundant comment. Encapsulate getDefaultCiteCommand in ExternalApplicationsPreferences and update JabRefPreferences accordingly
Thanks, looks good to me now! |
* upstream/Main: openrerwrite Update .github/PULL_REQUEST_TEMPLATE.md Update PULL_REQUEST_TEMPLATE.md Update .github/PULL_REQUEST_TEMPLATE.md Update PULL_REQUEST_TEMPLATE.md Replace "fixes" by "resolves" Change JavaDoc to annotation (JabRef#10571) Fix link (JabRef#10575) Enable collecting GitHub build artifacts for forks (JabRef#10574) Fix file field merging (JabRef#10573) Update .gitignore
* upstream/main: (419 commits) Fix CHANGELOG.md Bump commons-cli:commons-cli from 1.5.0 to 1.6.0 (JabRef#10607) Fix issue JabRef#9306: Move "Open only one instance of JabRef" preference option to somewhere else (JabRef#10602) Update README.md (JabRef#10604) Bump me.champeau.jmh from 0.7.1 to 0.7.2 Bump org.beryx.jlink from 3.0.0 to 3.0.1 Bump com.dlsc.gemsfx:gemsfx from 1.82.0 to 1.84.0 Bump org.apache.logging.log4j:log4j-to-slf4j from 2.21.0 to 2.21.1 Synchronize scrollbars in the change resolver dialog (JabRef#10587) Add button for a user to reset the cite command to the default value. (JabRef#10580) openrerwrite Update .github/PULL_REQUEST_TEMPLATE.md Update PULL_REQUEST_TEMPLATE.md Update .github/PULL_REQUEST_TEMPLATE.md Update PULL_REQUEST_TEMPLATE.md Replace "fixes" by "resolves" Change JavaDoc to annotation (JabRef#10571) Fix link (JabRef#10575) Enable collecting GitHub build artifacts for forks (JabRef#10574) Fix file field merging (JabRef#10573) ... # Conflicts: # src/main/java/org/jabref/gui/fieldeditors/identifier/IdentifierEditor.java # src/main/java/org/jabref/logic/importer/WebFetchers.java
* upstream/main: (1565 commits) Enable journal information fetcher directly in popup (#10598) Make generate button wider (#10588) make openRewrite stable again Rename cleanup_pr.yml to cleanup-pr.yml Changelog Fix failing fetcher tests (#10613) ShortDoi Fix CHANGELOG.md Bump commons-cli:commons-cli from 1.5.0 to 1.6.0 (#10607) Fix issue #9306: Move "Open only one instance of JabRef" preference option to somewhere else (#10602) Update README.md (#10604) Bump me.champeau.jmh from 0.7.1 to 0.7.2 Bump org.beryx.jlink from 3.0.0 to 3.0.1 Bump com.dlsc.gemsfx:gemsfx from 1.82.0 to 1.84.0 Bump org.apache.logging.log4j:log4j-to-slf4j from 2.21.0 to 2.21.1 Synchronize scrollbars in the change resolver dialog (#10587) Add button for a user to reset the cite command to the default value. (#10580) openrerwrite Update .github/PULL_REQUEST_TEMPLATE.md Update PULL_REQUEST_TEMPLATE.md ... # Conflicts: # .devcontainer/devcontainer.json # build.gradle # src/main/java/org/jabref/gui/DefaultInjector.java # src/main/java/org/jabref/gui/libraryproperties/general/GeneralProperties.fxml # src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesView.java # src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java # src/main/java/org/jabref/logic/exporter/MetaDataSerializer.java # src/main/java/org/jabref/logic/importer/util/MetaDataParser.java # src/main/java/org/jabref/model/metadata/MetaData.java # src/main/java/org/jabref/preferences/JabRefPreferences.java
* upstream/main: (44 commits) change codecov (JabRef#10616) Add entry based on ISSN number JabRef#10124 (JabRef#10178) Enable journal information fetcher directly in popup (JabRef#10598) Make generate button wider (JabRef#10588) make openRewrite stable again Rename cleanup_pr.yml to cleanup-pr.yml Changelog Fix failing fetcher tests (JabRef#10613) ShortDoi Fix CHANGELOG.md Bump commons-cli:commons-cli from 1.5.0 to 1.6.0 (JabRef#10607) Fix issue JabRef#9306: Move "Open only one instance of JabRef" preference option to somewhere else (JabRef#10602) Update README.md (JabRef#10604) Bump me.champeau.jmh from 0.7.1 to 0.7.2 Bump org.beryx.jlink from 3.0.0 to 3.0.1 Bump com.dlsc.gemsfx:gemsfx from 1.82.0 to 1.84.0 Bump org.apache.logging.log4j:log4j-to-slf4j from 2.21.0 to 2.21.1 Synchronize scrollbars in the change resolver dialog (JabRef#10587) Add button for a user to reset the cite command to the default value. (JabRef#10580) openrerwrite ...
Add button in ExternalTab.fxml and link it to a method in ExternalTabViewModel.java that sets the citeCommandProperty to the specified default value
\cite{key1,key2}
Update CHANGELOG.md
Fixes #10569
In the documentation is a screenshot that doesnt feature the two buttons next zu cite Command. Also the option to reset the command is not mentioned. I'm not sure if that would be necessary though.
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)