diff --git a/.gitattributes b/.gitattributes index 051e3cc80e6..237079524ae 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,5 +11,4 @@ gradlew text eol=lf *.java text eol=lf *.properties text eol=lf -# disable after a release (otherwise, duplicate CHANGELOG.md entries will be generated) -# CHANGELOG.md merge=union +CHANGELOG.md merge=union diff --git a/.github/workflows/deployment-arm64.yml b/.github/workflows/deployment-arm64.yml index f4e34f09f8f..a505062a065 100644 --- a/.github/workflows/deployment-arm64.yml +++ b/.github/workflows/deployment-arm64.yml @@ -66,12 +66,12 @@ jobs: submodules: 'true' show-progress: 'false' - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.11.0 + uses: gittools/actions/gitversion/setup@v0.13.4 with: versionSpec: "5.x" - name: Run GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v0.11.0 + uses: gittools/actions/gitversion/execute@v0.13.4 - name: Setup JDK uses: actions/setup-java@v4 with: diff --git a/.github/workflows/deployment-jdk-ea.yml b/.github/workflows/deployment-jdk-ea.yml index 10f34ba4a5f..20c018e7968 100644 --- a/.github/workflows/deployment-jdk-ea.yml +++ b/.github/workflows/deployment-jdk-ea.yml @@ -82,18 +82,17 @@ jobs: show-progress: 'false' - name: Install pigz and cache (linux) if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'buildjet-4vcpu-ubuntu-2204-arm') - # 1.3.1 works, 1.4.1 does not (https://github.com/awalsh128/cache-apt-pkgs-action/issues/126) - uses: koppor/cache-apt-pkgs-action@add-arm64-support + uses: awalsh128/cache-apt-pkgs-action@master with: packages: pigz version: 1.0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.11.0 + uses: gittools/actions/gitversion/setup@v0.13.4 with: versionSpec: "5.x" - name: Run GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v0.11.0 + uses: gittools/actions/gitversion/execute@v0.13.4 - name: 'Set up JDK ${{ matrix.jdk }}' uses: oracle-actions/setup-java@v1 with: diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 997dc580748..a18391321ed 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -79,12 +79,12 @@ jobs: packages: pigz version: 1.0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.11.0 + uses: gittools/actions/gitversion/setup@v0.13.4 with: versionSpec: "5.x" - name: Run GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v0.11.0 + uses: gittools/actions/gitversion/execute@v0.13.4 - name: Setup JDK uses: actions/setup-java@v4 with: diff --git a/.github/workflows/upload-release.yml b/.github/workflows/upload-release.yml index 41a73d8d6f8..d7020264bc5 100644 --- a/.github/workflows/upload-release.yml +++ b/.github/workflows/upload-release.yml @@ -18,7 +18,7 @@ jobs: cd build wget -q -m -r -nH --cut-dirs 2 --no-parent --accept=tar.gz,dmg,pkg,deb,rpm,zip,msi https://builds.jabref.org/tags/ - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: draft: true files: build/** diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f88d963e32..d351d53c217 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv ### Added +- We converted the "Custom API key" list to a table to be more accessible. [#10926](https://github.com/JabRef/jabref/issues/10926) - We added a "refresh" button for the LaTeX citations tab in the entry editor. [#10584](https://github.com/JabRef/jabref/issues/10584) - We added the possibility to show the BibTeX source in the [web search](https://docs.jabref.org/collect/import-using-online-bibliographic-database) import screen. [#560](https://github.com/koppor/jabref/issues/560) - We added a fetcher for [ISIDORE](https://isidore.science/), simply paste in the link into the text field or the last 6 digits in the link that identify that paper. [#10423](https://github.com/JabRef/jabref/issues/10423) @@ -25,6 +26,10 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We added the citation key pattern `[camelN]`. Equivalent to the first N words of the `[camel]` pattern. - We added importing of static groups and linked files from BibDesk .bib files. [#10381](https://github.com/JabRef/jabref/issues/10381) - We added ability to export in CFF (Citation File Format) [#10661](https://github.com/JabRef/jabref/issues/10661). +- We added ability to push entries to TeXworks. [#3197](https://github.com/JabRef/jabref/issues/3197) +- We added the ability to zoom in and out in the document viewer using Ctrl + Scroll. [#10964](https://github.com/JabRef/jabref/pull/10964) +- We added a Cleanup for removing non-existent files and grouped the related options [#10929](https://github.com/JabRef/jabref/issues/10929) +- We added the functionality to parse the bibliography of PDFs using the GROBID online service. [#10200](https://github.com/JabRef/jabref/issues/10200) ### Changed @@ -39,6 +44,8 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We made the command "Push to TexShop" more robust to allow cite commands with a character before the first slash. [forum#2699](https://discourse.jabref.org/t/push-to-texshop-mac/2699/17?u=siedlerchr) - We only show the notification "Saving library..." if the library contains more than 2000 entries. [#9803](https://github.com/JabRef/jabref/issues/9803) - We enhanced the dialog for adding new fields in the content selector with a selection box containing a list of standard fields. [#10912](https://github.com/JabRef/jabref/pull/10912) +- We store the citation relations in an LRU cache to avoid bloating the memory and out-of-memory exceptions. [#10958](https://github.com/JabRef/jabref/issues/10958) +- Keywords filed are now displayed as tags. [#10910](https://github.com/JabRef/jabref/pull/10910) ### Fixed @@ -47,6 +54,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where the preview panel showing the wrong entry (an entry that is not selected in the entry table). [#9172](https://github.com/JabRef/jabref/issues/9172) - We fixed an issue where HTML-reserved characters like '&' and '<', in addition to HTML entities like '&' were not rendered correctly in entry preview. [#10677](https://github.com/JabRef/jabref/issues/10677) - The last page of a PDF is now indexed by the full text search. [#10193](https://github.com/JabRef/jabref/issues/10193) +- The entry editor respects the configured custom tabs when showing "Other fields". [#11012](https://github.com/JabRef/jabref/pull/11012) - The default owner of an entry can be changed again. [#10924](https://github.com/JabRef/jabref/issues/10924) - We fixed an issue where the duplicate check did not take umlauts or other LaTeX-encoded characters into account. [#10744](https://github.com/JabRef/jabref/pull/10744) - We fixed the colors of the icon on hover for unset special fields. [#10431](https://github.com/JabRef/jabref/issues/10431) @@ -55,6 +63,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where the `CommentsTab` was not properly formatted when the `defaultOwner` contained capital or special letters. [#10870](https://github.com/JabRef/jabref/issues/10870) - We fixed an issue where the `File -> Close library` menu item was not disabled when no library was open. [#10948](https://github.com/JabRef/jabref/issues/10948) - We fixed an issue where the Document Viewer would show the PDF in only half the window when maximized. [#10934](https://github.com/JabRef/jabref/issues/10934) +- Clicking on the crossref and related tags in the entry editor jumps to the linked entry. [#5484](https://github.com/JabRef/jabref/issues/5484) [#9369](https://github.com/JabRef/jabref/issues/9369) ### Removed diff --git a/build.gradle b/build.gradle index 35be4acb0a0..61eeaafc33f 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { id 'me.champeau.jmh' version '0.7.2' - id 'org.javamodularity.moduleplugin' version '1.8.13' + id 'org.javamodularity.moduleplugin' version '1.8.15' id 'org.openjfx.javafxplugin' version '0.1.0' @@ -27,7 +27,7 @@ plugins { id 'idea' - id 'org.openrewrite.rewrite' version '6.8.2' + id 'org.openrewrite.rewrite' version '6.8.4' } // Enable following for debugging @@ -177,7 +177,7 @@ dependencies { implementation('com.tobiasdiez:easybind:2.2.1-SNAPSHOT') implementation 'org.fxmisc.flowless:flowless:0.7.2' implementation 'org.fxmisc.richtext:richtextfx:0.11.2' - implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.0.3') { + implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.2.0') { exclude module: 'javax.inject' // Split package, use only jakarta.inject exclude group: 'org.apache.logging.log4j' } @@ -196,14 +196,14 @@ dependencies { // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog) implementation 'org.slf4j:jul-to-slf4j:2.0.9' // route all requests to log4j to SLF4J - implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.23.0' + implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.23.1' implementation('de.undercouch:citeproc-java:3.0.0-beta.2') { exclude group: 'org.antlr' } // jakarta.activation is already dependency of glassfish - implementation group: 'jakarta.xml.bind', name: 'jakarta.xml.bind-api', version: '4.0.1' + implementation group: 'jakarta.xml.bind', name: 'jakarta.xml.bind-api', version: '4.0.2' implementation group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '4.0.3' implementation ('com.github.tomtung:latex2unicode_2.13:0.3.2') { @@ -228,7 +228,7 @@ dependencies { implementation 'org.glassfish.jersey.core:jersey-server:3.1.5' // injection framework implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.5' - implementation 'org.glassfish.hk2:hk2-api:3.0.6' + implementation 'org.glassfish.hk2:hk2-api:3.1.0' // testImplementation 'org.glassfish.hk2:hk2-testing:3.0.4' // implementation 'org.glassfish.hk2:hk2-testing-jersey:3.0.4' // testImplementation 'org.glassfish.hk2:hk2-junitrunner:3.0.4' @@ -242,13 +242,14 @@ dependencies { // Because of GraalVM quirks, we need to ship that. See https://github.com/jspecify/jspecify/issues/389#issuecomment-1661130973 for details implementation 'org.jspecify:jspecify:0.3.0' + // parse plist files implementation 'com.googlecode.plist:dd-plist:1.23' - testImplementation 'io.github.classgraph:classgraph:4.8.165' + testImplementation 'io.github.classgraph:classgraph:4.8.168' testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' testImplementation 'org.junit.platform:junit-platform-launcher:1.10.2' - testImplementation 'org.mockito:mockito-core:5.10.0' + testImplementation 'org.mockito:mockito-core:5.11.0' testImplementation 'org.xmlunit:xmlunit-core:2.9.1' testImplementation 'org.xmlunit:xmlunit-matchers:2.9.1' testRuntimeOnly 'com.tngtech.archunit:archunit-junit5-engine:1.2.1' @@ -262,7 +263,7 @@ dependencies { xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '3.0.2' xjc group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '3.0.2' - rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.6.4")) + rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.7.1")) rewrite("org.openrewrite.recipe:rewrite-static-analysis") rewrite("org.openrewrite.recipe:rewrite-logging-frameworks") rewrite("org.openrewrite.recipe:rewrite-testing-frameworks") diff --git a/config/README.md b/config/README.md index d0a6bf89e97..0bea959d5f2 100644 --- a/config/README.md +++ b/config/README.md @@ -20,7 +20,7 @@ Style-checks are done for each pull request and installing this code style confi # Eclipse: The Eclipse code formatter style is stored in the `eclipse.gradle` file and gets imported automatically. -In case the formatter style needs to be adapted, configure it and export in in eclipse. +In case the formatter style needs to be adapted, configure it and export in eclipse. 1. Right click on the eclipse project "JabRef" 2. Select "Export > General > Preferences" diff --git a/docs/code-howtos/custom-svg-icons.md b/docs/code-howtos/custom-svg-icons.md index cd20685a80a..5f6070c5700 100644 --- a/docs/code-howtos/custom-svg-icons.md +++ b/docs/code-howtos/custom-svg-icons.md @@ -23,7 +23,14 @@ Good icon design requires years of experience and cannot be covered here. Adapti ## Step 2. Packing the icons into a font -Use the [IcoMoon](https://icomoon.io) tool for packing the icons. Create a new set and import _all_ icons. Rearrange them so that they have the same order as in `org.jabref.gui.JabRefMaterialDesignIcon`. This will avoid that you have to change the code points for the existing glyphs. In the settings for your icon set, set the _Grid_ to 24. This is important to get the correct spacing. The name of the font is `JabRefMaterialDesign`. When your icon-set is ready, select all of them and download the font-package. +Use the [IcoMoon](https://icomoon.io) tool for packing the icons. + +1. Create a new set by importing the json file +2. Next to the icons, click on the hamburger menu, chose "Import to Set" to add a new icon (it will be added to the front) +Rearrange them so that they have the same order as in `org.jabref.gui.JabRefMaterialDesignIcon`. This will avoid that you have to change the code points for the existing glyphs. In the settings for your icon set, set the _Grid_ to 24. This is important to get the correct spacing. The name of the font is `JabRefMaterialDesign`. +3. Next to the icons, click on the hamburger menu and click "Select all". +4. Proceed with the font creating, set the font property name to `JabRefMaterialDesign` +When your icon-set is ready, select all of them and download the font-package. ## Step 3. Replace the existing `JabRefMaterialDesign.ttf` diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 1265cac4d31..6f66180350b 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -574,9 +574,11 @@ public void init() { EasyBind.subscribe(tabbedPane.getSelectionModel().selectedItemProperty(), selectedTab -> { if (selectedTab instanceof LibraryTab libraryTab) { stateManager.setActiveDatabase(libraryTab.getBibDatabaseContext()); + stateManager.activeTabProperty().set(Optional.of(libraryTab)); } else if (selectedTab == null) { // All databases are closed stateManager.setActiveDatabase(null); + stateManager.activeTabProperty().set(Optional.empty()); } }); diff --git a/src/main/java/org/jabref/gui/LibraryTab.java b/src/main/java/org/jabref/gui/LibraryTab.java index 8b9488b1559..cec2adb1644 100644 --- a/src/main/java/org/jabref/gui/LibraryTab.java +++ b/src/main/java/org/jabref/gui/LibraryTab.java @@ -282,8 +282,9 @@ private void setDatabaseContext(BibDatabaseContext bibDatabaseContext) { return; } if (tabPane.getSelectionModel().selectedItemProperty().get().equals(this)) { - LOGGER.debug("This case should not happen."); + LOGGER.warn("This case should not happen."); stateManager.setActiveDatabase(bibDatabaseContext); + stateManager.activeTabProperty().set(Optional.of(this)); } // Remove existing dummy BibDatabaseContext and add correct BibDatabaseContext from ParserResult to trigger changes in the openDatabases list in the stateManager @@ -597,8 +598,8 @@ private void setupAutoCompletion() { if (autoCompletePreferences.shouldAutoComplete()) { suggestionProviders = new SuggestionProviders(getDatabase(), Globals.journalAbbreviationRepository, autoCompletePreferences); } else { - // Create suggestion providers with database for crossref if auto-completion is deactivated - suggestionProviders = new SuggestionProviders(getDatabase()); + // Create empty suggestion providers if auto-completion is deactivated + suggestionProviders = new SuggestionProviders(); } searchAutoCompleter = new PersonNameSuggestionProvider(FieldFactory.getPersonNameFields(), getDatabase()); } diff --git a/src/main/java/org/jabref/gui/StateManager.java b/src/main/java/org/jabref/gui/StateManager.java index 743ad0ef473..bdc1659ac75 100644 --- a/src/main/java/org/jabref/gui/StateManager.java +++ b/src/main/java/org/jabref/gui/StateManager.java @@ -54,6 +54,7 @@ public class StateManager { private final CustomLocalDragboard localDragboard = new CustomLocalDragboard(); private final ObservableList openDatabases = FXCollections.observableArrayList(); private final OptionalObjectProperty activeDatabase = OptionalObjectProperty.empty(); + private final OptionalObjectProperty activeTab = OptionalObjectProperty.empty(); private final ReadOnlyListWrapper activeGroups = new ReadOnlyListWrapper<>(FXCollections.observableArrayList()); private final ObservableList selectedEntries = FXCollections.observableArrayList(); private final ObservableMap> selectedGroups = FXCollections.observableHashMap(); @@ -91,6 +92,10 @@ public OptionalObjectProperty activeDatabaseProperty() { return activeDatabase; } + public OptionalObjectProperty activeTabProperty() { + return activeTab; + } + public OptionalObjectProperty activeSearchQueryProperty() { return activeSearchQuery; } diff --git a/src/main/java/org/jabref/gui/actions/StandardActions.java b/src/main/java/org/jabref/gui/actions/StandardActions.java index 6f74e2caa1f..949dac28b29 100644 --- a/src/main/java/org/jabref/gui/actions/StandardActions.java +++ b/src/main/java/org/jabref/gui/actions/StandardActions.java @@ -32,6 +32,7 @@ public enum StandardActions implements Action { REBUILD_FULLTEXT_SEARCH_INDEX(Localization.lang("Rebuild fulltext search index"), IconTheme.JabRefIcons.FILE), REDOWNLOAD_MISSING_FILES(Localization.lang("Redownload missing files"), IconTheme.JabRefIcons.DOWNLOAD), OPEN_EXTERNAL_FILE(Localization.lang("Open file"), IconTheme.JabRefIcons.FILE, KeyBinding.OPEN_FILE), + EXTRACT_FILE_REFERENCES(Localization.lang("Extract references from file"), IconTheme.JabRefIcons.FILE_STAR), OPEN_URL(Localization.lang("Open URL or DOI"), IconTheme.JabRefIcons.WWW, KeyBinding.OPEN_URL_OR_DOI), SEARCH_SHORTSCIENCE(Localization.lang("Search ShortScience")), MERGE_WITH_FETCHED_ENTRY(Localization.lang("Get bibliographic data from %0", "DOI/ISBN/...")), diff --git a/src/main/java/org/jabref/gui/autocompleter/AutoCompletePreferences.java b/src/main/java/org/jabref/gui/autocompleter/AutoCompletePreferences.java index 160abb9ecb3..12689f76f99 100644 --- a/src/main/java/org/jabref/gui/autocompleter/AutoCompletePreferences.java +++ b/src/main/java/org/jabref/gui/autocompleter/AutoCompletePreferences.java @@ -10,7 +10,6 @@ import javafx.collections.ObservableSet; import org.jabref.model.entry.field.Field; -import org.jabref.model.entry.field.FieldFactory; public class AutoCompletePreferences { @@ -80,8 +79,4 @@ public void setNameFormat(NameFormat nameFormat) { public ObservableSet getCompleteFields() { return completeFields; } - - public String getCompleteNamesAsString() { - return FieldFactory.serializeFieldsList(completeFields); - } } diff --git a/src/main/java/org/jabref/gui/autocompleter/ContentSelectorSuggestionProvider.java b/src/main/java/org/jabref/gui/autocompleter/ContentSelectorSuggestionProvider.java index 01e56ff5350..ebb6ec04837 100644 --- a/src/main/java/org/jabref/gui/autocompleter/ContentSelectorSuggestionProvider.java +++ b/src/main/java/org/jabref/gui/autocompleter/ContentSelectorSuggestionProvider.java @@ -1,7 +1,6 @@ package org.jabref.gui.autocompleter; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.stream.Stream; @@ -26,7 +25,7 @@ public Stream getSource() { } @Override - public Collection getPossibleSuggestions() { + public List getPossibleSuggestions() { List suggestions = new ArrayList<>(); if (suggestionProvider != null) { suggestions.addAll(suggestionProvider.getPossibleSuggestions()); diff --git a/src/main/java/org/jabref/gui/autocompleter/SuggestionProvider.java b/src/main/java/org/jabref/gui/autocompleter/SuggestionProvider.java index 341c9ef8f5e..fb64bb372b7 100644 --- a/src/main/java/org/jabref/gui/autocompleter/SuggestionProvider.java +++ b/src/main/java/org/jabref/gui/autocompleter/SuggestionProvider.java @@ -29,6 +29,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Comparator; +import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -60,7 +61,7 @@ public final Collection provideSuggestions(ISuggestionRequest request) { protected abstract Equivalence getEquivalence(); - public Collection getPossibleSuggestions() { + public List getPossibleSuggestions() { Comparator comparator = getComparator().reversed(); Equivalence equivalence = getEquivalence(); return getSource().map(equivalence::wrap) // Need to do a bit of acrobatic as there is no distinctBy method diff --git a/src/main/java/org/jabref/gui/autocompleter/SuggestionProviders.java b/src/main/java/org/jabref/gui/autocompleter/SuggestionProviders.java index 7d023f4d815..06d2abef8a8 100644 --- a/src/main/java/org/jabref/gui/autocompleter/SuggestionProviders.java +++ b/src/main/java/org/jabref/gui/autocompleter/SuggestionProviders.java @@ -22,21 +22,12 @@ public SuggestionProviders(BibDatabase database, JournalAbbreviationRepository a this.isEmpty = false; } - public SuggestionProviders(BibDatabase database) { - this.database = database; - this.isEmpty = true; - } - public SuggestionProviders() { this.isEmpty = true; } public SuggestionProvider getForField(Field field) { if (isEmpty || !autoCompletePreferences.getCompleteFields().contains(field)) { - Set fieldProperties = field.getProperties(); - if (fieldProperties.contains(FieldProperty.SINGLE_ENTRY_LINK)) { - return new BibEntrySuggestionProvider(database); - } return new EmptySuggestionProvider(); } diff --git a/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.fxml b/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.fxml index 2ef2300a312..0812f829c71 100644 --- a/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.fxml +++ b/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.fxml @@ -14,26 +14,39 @@ - - - - - - - - - - -