-
Notifications
You must be signed in to change notification settings - Fork 0
Fix for issue #372 #1
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
base: main
Are you sure you want to change the base?
Conversation
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.
Would be great to add some comments explaining certain parts of the changes that are more complex.
private static void updateFieldIfNecessaryWithUndo(final BibEntry originalEntry, | ||
final BibEntry fetchedEntry, | ||
final Field field, final NamedCompound undoManager) { | ||
fetchedEntry.getField(field).ifPresent(fetchedValue -> originalEntry.getField(field).ifPresentOrElse( | ||
originalValue -> { | ||
if (fetchedValue.length() > originalValue.length()) { | ||
updateField(originalEntry, field, originalValue, fetchedValue, undoManager); | ||
} | ||
}, | ||
() -> updateField(originalEntry, field, null, fetchedValue, undoManager) | ||
)); | ||
} |
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 method could be simplified for better readability. I'd suggest using .map
and .flatMap
as suggested by the maintainers.
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.
Sure, will optimize soon
* Refine texts Signed-off-by: subhramit <[email protected]> * Update l10n Signed-off-by: subhramit <[email protected]> --------- Signed-off-by: subhramit <[email protected]>
Signed-off-by: subhramit <[email protected]>
Bumps [com.konghq:unirest-modules-gson](https://github.com/Kong/unirest-java) from 4.4.5 to 4.4.6. - [Release notes](https://github.com/Kong/unirest-java/releases) - [Changelog](https://github.com/Kong/unirest-java/blob/main/CHANGELOG.md) - [Commits](Kong/unirest-java@v4.4.5...v4.4.6) --- updated-dependencies: - dependency-name: com.konghq:unirest-modules-gson dependency-version: 4.4.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#13023) Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-yaml](https://github.com/FasterXML/jackson-dataformats-text) from 2.18.3 to 2.19.0. - [Commits](FasterXML/jackson-dataformats-text@jackson-dataformats-text-2.18.3...jackson-dataformats-text-2.19.0) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml dependency-version: 2.19.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [net.java.dev.jna:jna-platform](https://github.com/java-native-access/jna) from 5.16.0 to 5.17.0. - [Changelog](https://github.com/java-native-access/jna/blob/master/CHANGES.md) - [Commits](java-native-access/jna@5.16.0...5.17.0) --- updated-dependencies: - dependency-name: net.java.dev.jna:jna-platform dependency-version: 5.17.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [de.undercouch:citeproc-java](https://github.com/michel-kraemer/citeproc-java) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/michel-kraemer/citeproc-java/releases) - [Commits](michel-kraemer/citeproc-java@3.2.0...3.3.0) --- updated-dependencies: - dependency-name: de.undercouch:citeproc-java dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…JabRef#13022) Bumps [org.junit.platform:junit-platform-launcher](https://github.com/junit-team/junit5) from 1.12.1 to 1.12.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-launcher dependency-version: 1.12.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This reverts commit ef3d440.
* New translations jabref_en.properties (French) * New translations jabref_en.properties (Spanish) * New translations jabref_en.properties (German) * New translations jabref_en.properties (Greek) * New translations jabref_en.properties (Italian) * New translations jabref_en.properties (Japanese) * New translations jabref_en.properties (Korean) * New translations jabref_en.properties (Dutch) * New translations jabref_en.properties (Polish) * New translations jabref_en.properties (Russian) * New translations jabref_en.properties (Swedish) * New translations jabref_en.properties (Turkish) * New translations jabref_en.properties (Chinese Simplified) * New translations jabref_en.properties (Portuguese, Brazilian) * New translations jabref_en.properties (Indonesian) --------- Co-authored-by: Oliver Kopp <[email protected]>
* Execute only one test a time * Fix server start * Move Chocolate.bib to main resources * Move rest-api.http to correct path * Fix native-access-warning * Enable exception output in cae of error * Fix :jabsrv:run * Fix passing of available libraries * Use Chocolate.bib * Minor final fixes * Fix checkstyle * Result of OpenRewrite rewriteRun * Fix test * Get test starting again * Inject Gson, too * Enable full exception logging * Add link to test-logger * Fix checkstyle * Add GlobalExceptionMapper * Try to fix logging * Try to fix binding * Fix path * Fix spaces * Fix spaces - the other way * Fix " * Fix openrewrite * Update sub modules * Fix List modification * Compile fix * Improve start output
* Merging Entry Creation Buttons Into a Single Tool. This commit merges several tools used to create new entries (`NewEntry`, `EntryType`, `CreateEntryFromId`, and `PlainCitationParser`) into a single tool, `NewEntryUnified`. `NewEntryUnified` has a separate tab for each of its component creation methods. The last-used tab, and the values of non-text-entry fields, are preserved between runs of the tool and sessions of JabRef. The new tool reinstates the ComboBox option for which parser should be used to parse plaintext citations, and adds a new option to create entries from a block of Bib(La)TeX entry sources. Additionally: * The Quick-Create New Empty Entry tool still remains, and is linked to create new empty entries of the most-recently used `EntryType` selected in the new tool (when creating an empty entry of a specific type with the new tool). * The keyboard shortcut `Ctrl + Shift + N`, which previously opened the `PlainCitationParser` tool, now opens the new tool with the 'parse plaintext citation' tab pre-opened. * Removed an accidentally-left-in development comment. * Fixed some merge errors. * Fixed changelog entries for PR#13020 being in the wrong section. * Applied some rewrite recommendations, and added comments about good future improvements. * Fixed using an abbreviation in variable named, changed it to the full-form. * Swapped unused lambda variables out for 'ignore this argument' placeholder-things. * Changed instances of 'New Entry Unified' naming to simply 'New Entry' given that there is no "non-unified" new entry tool. * Changed usages of 'Arrays.asList()' to 'List.of()'. * Renamed 'NewEntryUnifiedActionTest.java' to 'NewEntryActionTest.java'. * Changed more instances of unused lambda variables to '_'. * Removed obsolete phrases. * Added a 1px margin around FlowPane buttons to help them stand out more. * Added a keybinding to launch the NewEntry tool focussed on the 'enter identifier' tab. A new entry was added to the 'library' menu to inform users of this. * Moved tool info/hints to the top of the tab content, and changed prompt text to tool hints (as the user starting JabRef with anything in their clipboard means they'd otherwise never see it). * Made the NewEntry tool's TitledPanes collapsible, so it's easier for the user to access custom types without needing to resize the panel. Also added preferences for whether-or-not these TitledPanes are collapsed, preserving there state between sessions. * Changed the default dimensions of the NewEntry tool window to nicer-looking values. * Improved some tab names and a help tip. * Fixed up phrases. * Changed FlowPane's to TilePane's because they look nicer. * Fixed comment formats. * Changed menu item names for launching the 'New Entry' tool. * Renamed 'NewEntryApproach' to 'NewEntryDialogTab'. * Changed 'NewEntryAction' constructors so they don't have to be passed typed null arguments anymore. * Renamed 'StandardActions.NEW_INSTANT_ENTRY' to 'StandardActions.NEW_ENTRY_IMMEDIATE'. * Fixed up some UI stuff, and user-facing text. * Fixed some phrases. * Fixed some UI formatting. * Another UI fix... * Applied a missed phrase change. * Improved a lot of naming consistency between variables, tool names, and enum values (all related to the 'NewEntry' tool). --------- Co-authored-by: Marika-Academic <>
* Fix directory path validation checks * Fix Checkstyle * Fix CHANGELOG.md entry * Fix particular library location path * Improve code quality * Update JabRef_en.properties * Improve validation for unsaved libraries * Fix minor typo and comment * stringfix * stringfix --------- Co-authored-by: Oliver Kopp <[email protected]>
* Add tests Signed-off-by: subhramit <[email protected]> * Add comment Signed-off-by: subhramit <[email protected]> --------- Signed-off-by: subhramit <[email protected]>
JabRef#13040) * Add fallback logic to ConvertToBiblatexCleanup for parsing ISO-style dates in BibTeX `year` field * Add fallback logic to ConvertToBiblatexCleanup for parsing ISO-style dates in BibTeX `year` field * Add changelog entry * changelog * test: replace setField with withField * apply suggestions for concise changelog and remove redundant trim in ConvertToBiblatexCleanup * use List instead of Collection in applyDateFallback * use hasField for date check * fix: Trim input in Date.parse and apply style review feedback JabRef#13040 * fix: Trim input in Date.parse and apply style review feedback JabRef#13040
* Add "JabRef suggested groups" context menu entry Implements a new context menu entry for the "All entries" group to add two predefined groups if they don't already exist: - "Entries without linked files" - A search group that finds entries with no file links - "Entries without groups" - A search group that finds entries not assigned to any group The menu item is disabled automatically when both suggested groups already exist in the library. The implementation includes: - A utility class with factory methods for creating the suggested groups - Logic to check for existence of similar groups before adding Fixes JabRef#12659 * Add unit tests for handling suggested groups in the GroupTreeViewModel: - Test that root node has no suggested groups by default - Test addition of all suggested groups when none exist - Test addition of only missing suggested groups - Test that no groups are added when all suggested groups already exist * Add entry in changelog for suggested groups feature * Refactor GroupTreeViewModel to use toList() for collecting suggested subgroups * Update CHANGELOG to include "Add JabRef suggested groups" feature
* Fix OO sync button not enabeld for jstyle * changelog entry
* Remove spaces * Remove line breaks * Fix casing
Co-authored-by: Subhramit Basu <[email protected]>
* Fixed Localizations in citation relations * Fix tooltip: 'Add selected entry(s) to library' (follow decision 0041 and localization rules)
* New translations jabref_en.properties (French) * New translations jabref_en.properties (Spanish) * New translations jabref_en.properties (German) * New translations jabref_en.properties (Italian) * New translations jabref_en.properties (Turkish) * New translations jabref_en.properties (Chinese Simplified) * New translations jabref_en.properties (Portuguese, Brazilian)
Co-authored-by: Oliver Kopp <[email protected]>
Co-authored-by: Oliver Kopp <[email protected]>
Co-authored-by: Oliver Kopp <[email protected]>
Co-authored-by: Oliver Kopp <[email protected]>
Co-authored-by: Oliver Kopp <[email protected]>
This PullRequest is just for teammate review