diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4aaeec87a3f..8c9b29c28c2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -31,7 +31,7 @@ // Install java. // See https://github.com/devcontainers/features/tree/main/src/java#options for details. "ghcr.io/devcontainers/features/java:1": { - "version": "21.0.2-tem", + "version": "23.0.1-tem", "installGradle": false, "jdkDistro": "Temurin" } diff --git a/.github/workflows/assign-issue.yml b/.github/workflows/assign-issue.yml index 07450aec692..7b1a9ac13bd 100644 --- a/.github/workflows/assign-issue.yml +++ b/.github/workflows/assign-issue.yml @@ -19,7 +19,7 @@ jobs: uses: takanome-dev/assign-issue-action@beta with: github_token: '${{ secrets.GITHUB_TOKEN }}' - days_until_unassign: 30 + days_until_unassign: 90 maintainers: koppor, Siedlerchr, ThiloteE, calixtus, HoussemNasri assigned_comment: | 👋 Hey @{{ handle }}, thank you for your interest in this issue! 🎉 diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index ce4c607f16c..3006d476b6c 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -32,7 +32,7 @@ jobs: restore-keys: cache-lychee- - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@v2.0.2 + uses: lycheeverse/lychee-action@v2.1.0 with: fail: true args: --accept '200,201,202,203,204,403,429,500' --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md' diff --git a/.github/workflows/cleanup-pr.yml b/.github/workflows/cleanup-pr.yml index a4caf50b257..490443b0460 100644 --- a/.github/workflows/cleanup-pr.yml +++ b/.github/workflows/cleanup-pr.yml @@ -29,7 +29,7 @@ jobs: BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }} - name: Delete folder on builds.jabref.org if: steps.checksecrets.outputs.secretspresent == 'YES' - uses: appleboy/ssh-action@v1.1.0 + uses: appleboy/ssh-action@v1.2.0 with: script: rm -rf /var/www/builds.jabref.org/www/pull/${{ github.event.pull_request.number }} || true host: build-upload.jabref.org diff --git a/.github/workflows/deployment-arm64.yml b/.github/workflows/deployment-arm64.yml index c739da3c8dc..8b26386157d 100644 --- a/.github/workflows/deployment-arm64.yml +++ b/.github/workflows/deployment-arm64.yml @@ -69,16 +69,16 @@ jobs: submodules: 'true' show-progress: 'false' - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v3.0.0 + uses: gittools/actions/gitversion/setup@v3.0.3 with: versionSpec: "5.x" - name: Run GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v3.0.0 + uses: gittools/actions/gitversion/execute@v3.0.3 - name: Setup JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Clean up keychain run: | diff --git a/.github/workflows/deployment-jdk-ea.yml b/.github/workflows/deployment-jdk-ea.yml index 73fb0ab6bc0..799b6c569c7 100644 --- a/.github/workflows/deployment-jdk-ea.yml +++ b/.github/workflows/deployment-jdk-ea.yml @@ -37,7 +37,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, buildjet-8vcpu-ubuntu-2204-arm] - jdk: [21] + jdk: [23] javafx: [24] include: - os: ubuntu-latest @@ -85,12 +85,12 @@ jobs: packages: pigz version: 1.0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v3.0.0 + uses: gittools/actions/gitversion/setup@v3.0.3 with: versionSpec: "5.x" - name: Run GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v3.0.0 + uses: gittools/actions/gitversion/execute@v3.0.3 # JDK - name: 'Set up JDK ${{ matrix.jdk }}' diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index bf28113ae68..b0411f93902 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -81,16 +81,16 @@ jobs: packages: pigz version: 1.0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v3.0.0 + uses: gittools/actions/gitversion/setup@v3.0.3 with: versionSpec: "5.x" - name: Run GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v3.0.0 + uses: gittools/actions/gitversion/execute@v3.0.3 - name: Setup JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/tests-fetchers.yml b/.github/workflows/tests-fetchers.yml index dc091bd67f4..e02bfca4916 100644 --- a/.github/workflows/tests-fetchers.yml +++ b/.github/workflows/tests-fetchers.yml @@ -48,7 +48,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b4ab5b8bd26..78f8bdd5c5f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,7 +37,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Run checkstyle reporter uses: dbelyaev/action-checkstyle@master @@ -65,7 +65,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -87,7 +87,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -109,7 +109,7 @@ jobs: submodules: 'false' show-progress: 'false' - name: markdownlint-cli2-action - uses: DavidAnson/markdownlint-cli2-action@v17 + uses: DavidAnson/markdownlint-cli2-action@v18 with: globs: | *.md @@ -175,7 +175,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -218,7 +218,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -259,7 +259,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -309,7 +309,7 @@ jobs: if: github.ref == 'refs/heads/main' uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -322,7 +322,7 @@ jobs: CI: "true" CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} DBMS: "postgresql" - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 if: (github.ref == 'refs/heads/main') && (steps.checksecrets.outputs.secretspresent == 'YES') with: token: ${{ secrets.CODECOV_TOKEN }} @@ -342,7 +342,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/update-gradle-wrapper.yml b/.github/workflows/update-gradle-wrapper.yml index efd0339950d..d0081709026 100644 --- a/.github/workflows/update-gradle-wrapper.yml +++ b/.github/workflows/update-gradle-wrapper.yml @@ -15,7 +15,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v4 with: - java-version: 21.0.5 + java-version: 23.0.1 distribution: 'temurin' - name: Update Gradle Wrapper diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 0e80edc3ec8..61c8da1a8e2 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -5,4 +5,4 @@ FROM gitpod/workspace-full # All available versions can be listed using sdk ls java # More information about SDKMAN available at https://github.com/sdkman/sdkman-cli#sdkman-cli RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \ - && sdk install java 21-open" + && sdk install java 23-open" diff --git a/.moderne/moderne.yml b/.moderne/moderne.yml new file mode 100644 index 00000000000..e90c2b39622 --- /dev/null +++ b/.moderne/moderne.yml @@ -0,0 +1,3 @@ +specs: specs.moderne.ai/v1/cli +java: + selectedJdk: '23' diff --git a/CHANGELOG.md b/CHANGELOG.md index 581b1a92a52..a3cc22ecc56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,12 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv ### Added -- Implemented BackupManagerGit to handle automatic backups of .bib files using Git, ensuring centralized, version-controlled backup management. [#2961] (https://github.com/JabRef/jabref/issues/2961#event-14646591632) -- Added automatic copying of .bib files to a jabref/backups directory every 19 seconds with comprehensive commit history. [#2961] -- Added support for unique file naming using UUIDs to prevent overwriting files with identical names in the backup directory. [#2961] -- Introduced UI functionality (only during opening) for saving, restoring, reviewing and discarding changes with accurate commit details retrieval. [#2961] -- Enabled a "Restore" button to recover specific backup versions. [#2961] +- Implemented BackupManagerGit to handle automatic backups of .bib files using Git, ensuring centralized, version-controlled backup management. [#2961](https://github.com/JabRef/jabref/issues/2961) +- Added automatic copying of .bib files to a jabref/backups directory every 19 seconds with comprehensive commit history. [#2961](https://github.com/JabRef/jabref/issues/2961) +- Added support for unique file naming using UUIDs to prevent overwriting files with identical names in the backup directory. [#2961](https://github.com/JabRef/jabref/issues/2961) +- Introduced UI functionality (only during opening) for saving, restoring, reviewing and discarding changes with accurate commit details retrieval. [#2961](https://github.com/JabRef/jabref/issues/2961) +- Enabled a "Restore" button to recover specific backup versions. [#2961](https://github.com/JabRef/jabref/issues/2961) +- We added a Markdown export layout. [#12220](https://github.com/JabRef/jabref/pull/12220) - We added a "view as BibTeX" option before importing an entry from the citation relation tab. [#11826](https://github.com/JabRef/jabref/issues/11826) - We added support finding LaTeX-encoded special characters based on plain Unicode and vice versa. [#11542](https://github.com/JabRef/jabref/pull/11542) - When a search hits a file, the file icon of that entry is changed accordingly. [#11542](https://github.com/JabRef/jabref/pull/11542) @@ -42,17 +43,21 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We added a different background color to the search bar to indicate when the search syntax is wrong. [#11658](https://github.com/JabRef/jabref/pull/11658) - We added a setting which always adds the literal "Cited on pages" text before each JStyle citation. [#11691](https://github.com/JabRef/jabref/pull/11732) - We added a new plain citation parser that uses LLMs. [#11825](https://github.com/JabRef/jabref/issues/11825) +- We added support for `langid` field for biblatex libraries. [#10868](https://github.com/JabRef/jabref/issues/10868) - We added support for modifier keys when dropping a file on an entry in the main table. [#12001](https://github.com/JabRef/jabref/pull/12001) - We added an importer for SSRN URLs. [#12021](https://github.com/JabRef/jabref/pull/12021) - We added a compare button to the duplicates in the citation relations tab to open the "Possible duplicate entries" window. [#11192](https://github.com/JabRef/jabref/issues/11192) - We added automatic browser extension install on Windows for Chrome and Edge. [#6076](https://github.com/JabRef/jabref/issues/6076) +- We added support to automatically open a `.bib` file in the current/parent folder if no other library is opened. [koppor#377](https://github.com/koppor/jabref/issues/377) - We added a search bar for filtering keyboard shortcuts. [#11686](https://github.com/JabRef/jabref/issues/11686) +- We added new modifiers `camel_case`, `camel_case_n`, `short_title`, and `very_short_title` for the [citation key generator](https://docs.jabref.org/setup/citationkeypatterns). [#11367](https://github.com/JabRef/jabref/issues/11367) - By double clicking on a local citation in the Citation Relations Tab you can now jump the linked entry. [#11955](https://github.com/JabRef/jabref/pull/11955) - We use the menu icon for background tasks as a progress indicator to visualise an import's progress when dragging and dropping several PDF files into the main table. [#12072](https://github.com/JabRef/jabref/pull/12072) +- The PDF content importer now supports importing title from upto the second page of the PDF. [#12139](https://github.com/JabRef/jabref/issues/12139) ### Changed -- Refactored backup-related components to integrate with the new BackupManagerGit, replacing the older BackupManager logic. [#2961] +- Refactored backup-related components to integrate with the new BackupManagerGit, replacing the older BackupManager logic. [#2961](https://github.com/JabRef/jabref/issues/2961) - A search in "any" fields ignores the [groups](https://docs.jabref.org/finding-sorting-and-cleaning-entries/groups). [#7996](https://github.com/JabRef/jabref/issues/7996) - When a communication error with an [online service](https://docs.jabref.org/collect/import-using-online-bibliographic-database) occurs, JabRef displays the HTTP error. [#11223](https://github.com/JabRef/jabref/issues/11223) - The Pubmed/Medline Plain importer now imports the PMID field as well [#11488](https://github.com/JabRef/jabref/issues/11488) @@ -79,7 +84,10 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - When importing a file using "Find Unlinked Files", when one or more file directories are available, the file path will be relativized where possible [koppor#549](https://github.com/koppor/jabref/issues/549) - We added minimum window sizing for windows dedicated to creating new entries [#11944](https://github.com/JabRef/jabref/issues/11944) - We changed the name of the library-based file directory from 'General File Directory' to 'Library-specific File Directory' per issue. [#571](https://github.com/koppor/jabref/issues/571) +- We changed the defualt [unwanted charachters](https://docs.jabref.org/setup/citationkeypatterns#removing-unwanted-characters) in the citation key generator and allow a dash (`-`) and colon (`:`) being part of a citation key. [#12144](https://github.com/JabRef/jabref/pull/12144) - The CitationKey column is now a default shown column for the entry table. [#10510](https://github.com/JabRef/jabref/issues/10510) +- We disabled the actions "Open Terminal here" and "Reveal in file explorer" for unsaved libraries. [#11920](https://github.com/JabRef/jabref/issues/11920) +- JabRef now opens the corresponding directory in the library properties when "Browse" is clicked. [#12223](https://github.com/JabRef/jabref/pull/12223) ### Fixed @@ -116,10 +124,14 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where the "Do not ask again" checkbox was not working, when asking for permission to use Grobid [koppor#556](https://github.com/koppor/jabref/issues/566). - We fixed an issue where we display warning message for moving attached open files. [#10121](https://github.com/JabRef/jabref/issues/10121) - We fixed an issue where it was not possible to select selecting content of other user's comments.[#11106](https://github.com/JabRef/jabref/issues/11106) +- We fixed an issue when handling URLs containing a pipe (`|`) character. [#11876](https://github.com/JabRef/jabref/issues/11876) - We fixed an issue where web search preferences "Custom API key" table modifications not discarded. [#11925](https://github.com/JabRef/jabref/issues/11925) - We fixed an issue when opening attached files in [extra file columns](https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks#adding-additional-columns-to-entry-table-for-file-types). [#12005](https://github.com/JabRef/jabref/issues/12005) - We fixed an issue where trying to open a library from a failed mounted directory on Mac would cause an error. [#10548](https://github.com/JabRef/jabref/issues/10548) +- We fixed an issue when the preview was out of sync. [#9172](https://github.com/JabRef/jabref/issues/9172) - We fixed an issue where identifier paste couldn't work with Unicode REPLACEMENT CHARACTER. [#11986](https://github.com/JabRef/jabref/issues/11986) +- We fixed an issue when click on entry at "Check Integrity" wasn't properly focusing the entry and field. [#11997](https://github.com/JabRef/jabref/issues/11997) +- We fixed an issue with the ui not scaling when changing the font size [#11219](https://github.com/JabRef/jabref/issues/11219) ### Removed diff --git a/README.md b/README.md index 3ca468f400f..c4a5808600f 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,33 @@ We will discuss improvements with you and agree to merge them once the [develope Please also remember to discuss bigger changes early with the core developers to ensure properly spend time and work. Some fundamental design decisions can be found within our list of [Architectural Decision Records](https://devdocs.jabref.org/decisions/). +## Research and Education + +JabRef welcomes research applied to it. +The current list of papers where JabRef helped to enhance science is maintained at . + +The JabRef team also fosters to use JabRef in Software Engineering training. +We offer guidelines for this at . + +When citing JabRef, please use following citation: + +```bibtex +@Article{jabref, + author = {Oliver Kopp and Carl Christian Snethlage and Christoph Schwentker}, + title = {JabRef: BibTeX-based literature management software}, + journal = {TUGboat}, + volume = {44}, + number = {3}, + pages = {441--447}, + doi = {10.47397/tb/44-3/tb138kopp-jabref}, + issn = {0896-3207}, + issue = {138}, + year = {2023}, +} +``` + +DOI (also includes [full text](https://tug.org/TUGboat/tb44-3/tb138kopp-jabref.pdf)): [10.47397/tb/44-3/tb138kopp-jabref](https://doi.org/10.47397/tb/44-3/tb138kopp-jabref). + ## Sponsoring JabRef development is powered by YourKit Java Profiler diff --git a/build.gradle b/build.gradle index 70befe38f8c..8e157f0dfdc 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ import org.jabref.build.xjc.XjcTask plugins { id 'application' - id 'com.github.andygoossens.modernizer' version '1.9.3' + id 'com.github.andygoossens.modernizer' version '1.10.0' id 'me.champeau.jmh' version '0.7.2' @@ -15,7 +15,7 @@ plugins { id 'org.openjfx.javafxplugin' version '0.1.0' - id 'org.beryx.jlink' version '3.0.1' + id 'org.beryx.jlink' version '3.1.0-rc-1' // nicer test outputs during running and completion // Homepage: https://github.com/radarsh/gradle-test-logger-plugin @@ -29,7 +29,7 @@ plugins { id 'idea' - id 'org.openrewrite.rewrite' version '6.25.1' + id 'org.openrewrite.rewrite' version '6.27.2' id "org.itsallcode.openfasttrace" version "3.0.1" } @@ -45,8 +45,8 @@ group = "org.jabref" version = project.findProperty('projVersion') ?: '100.0.0' java { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_23 + targetCompatibility = JavaVersion.VERSION_23 // Workaround needed for Eclipse, probably because of https://github.com/gradle/gradle/issues/16922 // Should be removed as soon as Gradle 7.0.1 is released ( https://github.com/gradle/gradle/issues/16922#issuecomment-828217060 ) @@ -54,13 +54,15 @@ java { toolchain { // If this is updated, also update - // - .gitpod.Dockerfile + // - build.gradle -> jacoco -> toolVersion (because JaCoCo does not support newest JDK out of the box. Check versions at https://www.jacoco.org/jacoco/trunk/doc/changes.html) // - .devcontainer/devcontainer.json#L34 and + // - .gitpod.Dockerfile + // - .moderne/moderne.yml // - .github/workflows/deployment*.yml // - .github/workflows/tests*.yml // - .github/workflows/update-gradle-wrapper.yml // - docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md - languageVersion = JavaLanguageVersion.of(21) + languageVersion = JavaLanguageVersion.of(23) // See https://docs.gradle.org/current/javadoc/org/gradle/jvm/toolchain/JvmVendorSpec.html for a full list // vendor = JvmVendorSpec.AMAZON } @@ -129,6 +131,7 @@ sourceSets { repositories { mavenCentral() maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } + maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } maven { url 'https://jitpack.io' } maven { url 'https://oss.sonatype.org/content/groups/public' } @@ -150,7 +153,7 @@ javafx { } jacoco { - toolVersion = "0.8.10" + toolVersion = "0.8.13-SNAPSHOT" } dependencies { @@ -183,7 +186,7 @@ dependencies { implementation 'com.h2database:h2-mvstore:2.3.232' // required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635 - implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1' + implementation 'org.bouncycastle:bcprov-jdk18on:1.79' implementation 'commons-cli:commons-cli:1.9.0' @@ -204,7 +207,7 @@ dependencies { implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '7.0.0.202409031743-r' implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.18.1' - implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.18.0' + implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.18.1' implementation 'com.fasterxml:aalto-xml:1.3.3' @@ -241,7 +244,7 @@ dependencies { } implementation 'org.fxmisc.flowless:flowless:0.7.3' implementation 'org.fxmisc.richtext:richtextfx:0.11.3' - implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.63.0') { + implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.64.0') { exclude module: 'javax.inject' // Split package, use only jakarta.inject exclude module: 'commons-lang3' exclude group: 'org.apache.commons.validator' @@ -253,7 +256,7 @@ dependencies { exclude group: 'tech.units' } // Required by gemsfx - implementation 'tech.units:indriya:2.2' + implementation 'tech.units:indriya:2.2.1' // Required by gemsfx and langchain4j implementation ('com.squareup.retrofit2:retrofit:2.11.0') { exclude group: 'com.squareup.okhttp3' @@ -263,7 +266,7 @@ dependencies { // region HTTP clients implementation 'org.jsoup:jsoup:1.18.1' - implementation 'com.konghq:unirest-java-core:4.4.4' + implementation 'com.konghq:unirest-java-core:4.4.5' implementation 'com.konghq:unirest-modules-gson:4.4.5' implementation 'org.apache.httpcomponents.client5:httpclient5:5.4' // endregion @@ -276,7 +279,7 @@ dependencies { // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog) implementation 'org.slf4j:jul-to-slf4j:2.0.16' // route all requests to log4j to SLF4J - implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.24.1' + implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.24.2' implementation('de.undercouch:citeproc-java:3.1.0') { exclude group: 'org.antlr' @@ -332,23 +335,23 @@ dependencies { implementation 'org.yaml:snakeyaml:2.3' // region AI - implementation 'dev.langchain4j:langchain4j:0.35.0' + implementation 'dev.langchain4j:langchain4j:0.36.0' // Even though we use jvm-openai for LLM connection, we still need this package for tokenization. - implementation('dev.langchain4j:langchain4j-open-ai:0.35.0') { + implementation('dev.langchain4j:langchain4j-open-ai:0.36.2') { exclude group: 'com.squareup.okhttp3' exclude group: 'com.squareup.retrofit2', module: 'retrofit' exclude group: 'org.jetbrains.kotlin' } - implementation('dev.langchain4j:langchain4j-mistral-ai:0.35.0') { + implementation('dev.langchain4j:langchain4j-mistral-ai:0.36.2') { exclude group: 'com.squareup.okhttp3' exclude group: 'com.squareup.retrofit2', module: 'retrofit' exclude group: 'org.jetbrains.kotlin' } - implementation('dev.langchain4j:langchain4j-google-ai-gemini:0.35.0') { + implementation('dev.langchain4j:langchain4j-google-ai-gemini:0.36.0') { exclude group: 'com.squareup.okhttp3' exclude group: 'com.squareup.retrofit2', module: 'retrofit' } - implementation('dev.langchain4j:langchain4j-hugging-face:0.35.0') { + implementation('dev.langchain4j:langchain4j-hugging-face:0.36.0') { exclude group: 'com.squareup.okhttp3' exclude group: 'com.squareup.retrofit2', module: 'retrofit' exclude group: 'org.jetbrains.kotlin' @@ -365,20 +368,20 @@ dependencies { exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8' } // GemxFX also (transitively) depends on kotlin - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21' + implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.0' // endregion - implementation 'commons-io:commons-io:2.17.0' + implementation 'commons-io:commons-io:2.18.0' // Even if "compileOnly" is used, IntelliJ always adds to module-info.java. To avoid issues during committing, we use "implementation" instead of "compileOnly" implementation 'io.github.adr:e-adr:2.0.0-SNAPSHOT' - implementation 'io.zonky.test:embedded-postgres:2.0.7' - implementation enforcedPlatform('io.zonky.test.postgres:embedded-postgres-binaries-bom:17.0.0') + implementation 'io.zonky.test:embedded-postgres:2.1.0' + implementation enforcedPlatform('io.zonky.test.postgres:embedded-postgres-binaries-bom:17.2.0') - testImplementation 'io.github.classgraph:classgraph:4.8.177' - testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0' - testImplementation 'org.junit.platform:junit-platform-launcher:1.10.3' + testImplementation 'io.github.classgraph:classgraph:4.8.179' + testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3' + testImplementation 'org.junit.platform:junit-platform-launcher:1.11.3' testImplementation 'org.mockito:mockito-core:5.14.2' testImplementation 'org.xmlunit:xmlunit-core:2.10.0' @@ -391,14 +394,14 @@ dependencies { testImplementation "com.github.javaparser:javaparser-symbol-solver-core:3.26.2" // recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954 - testImplementation 'org.wiremock:wiremock-standalone:3.3.1' + testImplementation 'org.wiremock:wiremock-standalone:3.9.2' - checkstyle 'com.puppycrawl.tools:checkstyle:10.18.2' + checkstyle 'com.puppycrawl.tools:checkstyle:10.20.1' // xjc needs the runtime as well for the ant task, otherwise it fails 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.19.0")) + rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.22.0")) 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/IntelliJ Code Style.xml b/config/IntelliJ Code Style.xml index 6a03e104d9d..51aa18498d7 100644 --- a/config/IntelliJ Code Style.xml +++ b/config/IntelliJ Code Style.xml @@ -293,4 +293,4 @@ - \ No newline at end of file + diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index b40e6b25d37..312e52aca6e 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -33,6 +33,13 @@ + + + + + + + diff --git a/config/checkstyle/checkstyle_reviewdog.xml b/config/checkstyle/checkstyle_reviewdog.xml index 510baff905f..13f380bad61 100644 --- a/config/checkstyle/checkstyle_reviewdog.xml +++ b/config/checkstyle/checkstyle_reviewdog.xml @@ -33,6 +33,13 @@ + + + + + + + diff --git a/docs/decisions/0034-use-citation-key-for-grouping-chat-messages.md b/docs/decisions/0034-use-citation-key-for-grouping-chat-messages.md index f6ef24dc69f..e807bd758f8 100644 --- a/docs/decisions/0034-use-citation-key-for-grouping-chat-messages.md +++ b/docs/decisions/0034-use-citation-key-for-grouping-chat-messages.md @@ -7,25 +7,25 @@ parent: Decision Records ## Context and Problem Statement -Because we store chat messages not inside a BIB entry in `.bib` filecc, the chats file is represented as a map to -BIB entry and a list of messages. We need to specify the key of this map. Turns out, it is not that easy. +As we store chat messages not inside a BibTeX entry in `.bib` file, the chats file is represented as a map to +BibTeX entry and a list of messages. We need to specify the key of this map. Turns out, it is not that easy. ## Decision Drivers -* The key should exist for every BIB entry -* The key should be unique along other BIB entries in one library file -* The key should not change at run-time, between launches of JabRef, and should be cross-platform (most important) +* The key should exist for every BibTeX entry +* The key should be unique along other BibTeX entries in one library file +* It is assumed that the key does not change at run-time, between launches of JabRef, and should be cross-platform (most important) ## Considered Options * `BibEntry` Java object * `BibEntry`'s `id` -* `BibEntry`'s Citation key +* `BibEntry`'s citation key * `BibEntry`'s `ShareId` ## Decision Outcome -Chosen option: "`BibEntry`'s Citation key", because this is the only choice that complains to the third point in Decision Drivers. +Chosen option: "`BibEntry`'s citation key", because this is the only choice that complies to the third point in Decision Drivers. ### Positive Consequences @@ -50,11 +50,11 @@ This identifier is created on each load of a library (and not stored permanently Very bad, for the same reasons as `BibEntry` Java object. -### `BibEntry`'s Citation key +### `BibEntry`'s citation key * Good, because it is cross-platform, stable (meaning stays the same across launches of JabRef) * Bad, because it is not guaranteed that citation key exists on `BibEntry`, and that it is unique across other -`BibEntriy`'s' in the library +BibTeX entries in the library ### `BibEntry`'s `ShareId` @@ -67,3 +67,5 @@ This approach cannot be used here, because there is no server running which we c ## More Information Refer to [issue #160](https://github.com/JabRef/jabref/issues/160) in JabRef main repository + +[ADR-038](0038-use-entryId-for-bibentries.md) takes another option, because it re-generates the index at each start of JabRef. diff --git a/docs/decisions/0039-use-apache-velocity-as-template-engine.md b/docs/decisions/0039-use-apache-velocity-as-template-engine.md index 5e6ca8d1072..46435540836 100644 --- a/docs/decisions/0039-use-apache-velocity-as-template-engine.md +++ b/docs/decisions/0039-use-apache-velocity-as-template-engine.md @@ -54,6 +54,7 @@ ${CanonicalBibEntry.getCanonicalRepresentation($entry)} * Good, because it has simple syntax, and it is designed for simple template workflows. * Good, because it has a stable syntax ([source](https://stackoverflow.com/a/1984458/10037342)). * Bad, because it is in maintenance mode. +* Bad, because [removed from Spring 5.0.1](https://www.baeldung.com/spring-template-engines#other-template-engines) ### Apache FreeMarker @@ -107,4 +108,7 @@ Here are the papers you are analyzing: As stated in [the template discussion issue](https://github.com/koppor/jabref/issues/392), we should choose a template engine, and then slowly migrate previous code and templates to the chosen engine. +Other template engines are discussed at , especially [`#other-template-engines`](https://www.baeldung.com/spring-template-engines#other-template-engines). +We did not find any other engine there worth switching to. + diff --git a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md index b818be103d7..9e150ae1a74 100644 --- a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md +++ b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md @@ -62,4 +62,19 @@ This will make these directories "Unregistered roots:", which is fine. ![Directory Mappings having three repositories unregsitered](intellij-directory-mappings-unregistered-roots.png) {% endfigure %} +## Ensure that committing with other tools work + +Open a "git bash". +On Windows, navigate to `C:\git-repositories\JabRef`. +Open the context menu of the file explorer (using the right mouse button), choose "Open Git Bash here". + +Execute following command: + +```shell +git update-index --assume-unchanged buildres/abbrv.jabref.org src/main/resources/csl-styles src/main/resources/csl-locales +``` + +{: .tip } +If you do not see the context menu, re-install git following the steps given at [StackOverflow](https://stackoverflow.com/a/50667280/873282). + diff --git a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md index 7d86ae38001..85fd85cf130 100644 --- a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md +++ b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md @@ -6,24 +6,24 @@ nav_order: 12 # Step 2: Set up the build system: JDK and Gradle -## Ensure that JDK 21 is available to IntelliJ +## Ensure that JDK 23 is available to IntelliJ -Ensure you have a Java 21 SDK configured by navigating to **File > Project Structure... > Platform Settings > SDKs**.
+Ensure you have a Java 23 SDK configured by navigating to **File > Project Structure... > Platform Settings > SDKs**.
**Note:** In some MacBooks, `Project Structure` can be found at the "IntelliJ" button of the app menu instead of at "File". -{% figure caption:"JDKs 11, 14, and 15 shown in available SDKs. JDK 21 is missing." %} +{% figure caption:"JDKs 11, 14, and 15 shown in available SDKs. JDK 23 is missing." %} ![Plattform Settings - SDKs](intellij-choose-jdk-adoptopenjdk-on-windows-project-settings.png) {% endfigure %} -If there is another JDK than JDK 21 selected, click on the plus button and choose "Download JDK..." +If there is another JDK than JDK 23 selected, click on the plus button and choose "Download JDK..." {% figure caption:"Download JDK..." %} ![Plattform Settings - SDKs - plus button - Download JDK...](guidelines-select-download-jdk.png) {% endfigure %} -Select JDK version 21 and then Eclipse Temurin. +Select JDK version 23 and then Eclipse Temurin. -{% figure caption:"Example for JDK 21 - Choose Eclipse Temurin" %} +{% figure caption:"Example for JDK 23 - Choose Eclipse Temurin" %} ![Download Eclipse Temurin](guidelines-intellij-select-jdk-eclipse-temurin.png) {% endfigure %} @@ -33,10 +33,10 @@ After clicking "Download", IntelliJ installs Eclipse Temurin: ![IntelliJ installs Eclipse Temurin](guidelines-intellij-installs-temurin.png) {% endfigure %} -Navigate to **Project Settings > Project** and ensure that the projects' SDK is Java 21. +Navigate to **Project Settings > Project** and ensure that the projects' SDK is Java 23. -{% figure caption:"Project SDK is pinned to the downloaded SDK (showing JDK 21 as example)" %} -![Project SDK is JDK 21](guidelines-intellij-project-settings-jdk.png) +{% figure caption:"Project SDK is pinned to the downloaded SDK (showing JDK 23 as example)" %} +![Project SDK is JDK 23](guidelines-intellij-project-settings-jdk.png) {% endfigure %} Click "OK" to store the changes. @@ -44,9 +44,9 @@ Click "OK" to store the changes. ## Ensure correct JDK setting for Gradle Navigate to **File > Settings... > Build, Execution, Deployment > Build Tools > Gradle** and select the "Project SDK" as the Gradle JVM at the bottom. -If that does not exist, just select JDK 21. +If that does not exist, just select JDK 23. -{% figure caption:"Gradle JVM is project SDK (showing "Projekt SDK temurin-21" as example)" %} +{% figure caption:"Gradle JVM is project SDK (showing "Projekt SDK temurin-23" as example)" %} ![Gradle JVM is project SDK](guidelines-intellij-settings-gradle-gradlejvm-is-projectjvm.png) {% endfigure %} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fb602ee2af0..eb1a55be0e1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/rewrite.yml b/rewrite.yml index ecaf9b7b001..e3842701b47 100644 --- a/rewrite.yml +++ b/rewrite.yml @@ -209,7 +209,8 @@ recipeList: - org.openrewrite.java.testing.junit5.RemoveDuplicateTestTemplates - org.openrewrite.java.testing.junit5.RemoveTryCatchFailBlocks - org.openrewrite.java.testing.junit5.LifecycleNonPrivate - - org.openrewrite.java.testing.junit5.StaticImports + # Does not work on some JDK releases. See https://github.com/openrewrite/rewrite-logging-frameworks/issues/177. + # - org.openrewrite.java.testing.junit5.StaticImports # Logging - org.openrewrite.java.logging.slf4j.Slf4jBestPractices diff --git a/src/main/java/org/jabref/cli/ArgumentProcessor.java b/src/main/java/org/jabref/cli/ArgumentProcessor.java index 3df190f9816..bc7cb7d3ed7 100644 --- a/src/main/java/org/jabref/cli/ArgumentProcessor.java +++ b/src/main/java/org/jabref/cli/ArgumentProcessor.java @@ -99,7 +99,7 @@ public ArgumentProcessor(String[] args, } /** - * Will open a file (like {@link #importFile(String)}, but will also request JabRef to focus on this database. + * Will open a file (like {@link #importFile(String)}, but will also request JabRef to focus on this library. * * @return ParserResult with setToOpenTab(true) */ diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 49d581717c7..af7759a1453 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -1,4 +1,5 @@ .root { + /* Note that counting for odd/even starts at 0, thus the first displayed row is even */ -jr-row-odd-background: -fx-control-inner-background-alt; -jr-row-even-background: -fx-control-inner-background; /* @@ -340,6 +341,10 @@ TextFlow > .hyperlink:visited, -fx-underline: true; } +.TextFlow > .embeddedHyperlink { + -fx-padding: 0.166667em 0.25em 0.166667em 0.25em; +} + .glyph-icon { /* This adjusts text alignment within the bounds of text nodes so that the text is always vertically centered within the bounds. Based on @@ -394,7 +399,7 @@ TextFlow > .tooltip-text-monospaced { .combo-box-base:editable > .arrow-button { -fx-background-color: transparent; -fx-background-insets: 0; - -fx-background-radius: 4px; + -fx-background-radius: 0.25em; -fx-text-fill: -fx-text-base-color; } @@ -402,8 +407,8 @@ TextFlow > .tooltip-text-monospaced { .button { -fx-background-color: transparent; -fx-border-color: -fx-outer-border; /* rgba(0, 0, 0, 0.23); */ - -fx-border-width: 1px; - -fx-border-radius: 4px; + -fx-border-width: 0.062em; + -fx-border-radius: 0.25em; -fx-padding: 0.5em 1em 0.5em 1em; } @@ -434,7 +439,7 @@ TextFlow > .tooltip-text-monospaced { } .text-button { - -fx-border-width: 0px; + -fx-border-width: 0; } .contained-button { @@ -445,7 +450,7 @@ TextFlow > .tooltip-text-monospaced { .icon-buttonNoSpaceBottom, .icon-buttonNoSpaceTop, .icon-button { - -fx-border-width: 0px; + -fx-border-width: 0; -fx-background-color: -jr-icon-background; -fx-padding: 0.5em; } @@ -490,7 +495,7 @@ TextFlow > .tooltip-text-monospaced { .progress-indicator { -fx-progress-color: -jr-theme; - -fx-border-width: 0px; + -fx-border-width: 0; -fx-background-color: -jr-icon-background; } @@ -513,13 +518,13 @@ TextFlow > .tooltip-text-monospaced { .check-box > .box { -fx-border-color: -fx-outer-border; /* rgba(0, 0, 0, 0.54); */ - -fx-border-width: 2px; - -fx-border-radius: 1px; + -fx-border-width: 0.125em; + -fx-border-radius: 0.062em; -fx-padding: 0.1em 0.1em 0.2em 0.2em; } .check-box:selected > .box { - -fx-background-insets: 2px; + -fx-background-insets: 0.125em; -fx-border-color: -jr-checked; -fx-background-color: -jr-checked; } @@ -538,7 +543,7 @@ TextFlow > .tooltip-text-monospaced { -fx-background-radius: 1.0em; /* large value to make sure this remains circular */ -fx-padding: 0.35em; /* padding from outside edge to the inner dot */ -fx-background-color: rgba(0, 0, 0, 0.54), -fx-control-inner-background; - -fx-background-insets: 0, 2px; + -fx-background-insets: 0, 0.125em; } .radio-button:selected > .radio { @@ -645,7 +650,7 @@ TextFlow > .tooltip-text-monospaced { } .tab-pane > .tab-header-area > .headers-region > .tab .glyph-icon { - -glyph-size: 13px; + -glyph-size: 0.812em; -fx-fill: -fx-mid-text-color; -fx-text-fill: -fx-mid-text-color; } @@ -1000,7 +1005,7 @@ TextFlow > .tooltip-text-monospaced { .sidePaneComponentHeader .ikonli-font-icon { -fx-fill: -jr-sidepane-header-color; -fx-text-fill: -jr-sidepane-header-color; - -fx-font-size: 16px; + -fx-font-size: 1.0em; -fx-icon-color: -jr-theme-text; } @@ -1241,7 +1246,7 @@ We want to have a look that matches our icons in the tool-bar */ .notification-bar > .pane { -fx-background-color: -jr-gray-3; - -fx-background-radius: 4px; + -fx-background-radius: 0.25em; } .notification-bar > .pane > .title, @@ -1253,17 +1258,17 @@ We want to have a look that matches our icons in the tool-bar */ .notification-bar > .pane { -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.3), 9, 0, 0, 2); - -fx-padding: 6px 7px 6px 32px; - -fx-background-radius: 0px; - -fx-border-radius: 0px; + -fx-padding: 0.375em 0.438em 0.375em 2.0em; + -fx-background-radius: 0; + -fx-border-radius: 0; } .notification-bar > .pane > .button-bar > .container { - -fx-padding: 0px 24px 0px 0px; + -fx-padding: 0.0em 1.5em 0.0em 0.0em; } .notification-bar > .pane > .label { - -fx-graphic-text-gap: 8px; + -fx-graphic-text-gap: 0.5em; } .notification-pane .notification-bar > .pane .close-button > .graphic { @@ -1271,7 +1276,7 @@ We want to have a look that matches our icons in the tool-bar */ } .notification-bar > .pane > .label > .ikonli-font-icon { - -fx-icon-size: 16px; + -fx-icon-size: 1.0em; -fx-icon-color: -jr-base; } @@ -1292,19 +1297,19 @@ We want to have a look that matches our icons in the tool-bar */ .color-picker:focused, .color-picker { -fx-background-color: transparent, transparent, transparent, transparent; - -fx-background-radius: 0px; - -fx-background-insets: 0px; + -fx-background-radius: 0; + -fx-background-insets: 0; -fx-effect: null; } .color-palette { -fx-background-color: -fx-background; - -fx-background-radius: 0px; - -fx-background-insets: 0px; + -fx-background-radius: 0; + -fx-background-insets: 0; } .color-palette-region .button { - -fx-border-width: 0px; + -fx-border-width: 0; } .bibEntry { @@ -1427,8 +1432,8 @@ We want to have a look that matches our icons in the tool-bar */ } .tags-field { - -fx-pref-height: 30px; - -fx-margin: 0em; + -fx-pref-height: 1.875em; + -fx-margin: 0; -fx-border-style: none; -fx-background-color: -fx-outer-border, -fx-control-inner-background; } @@ -1477,7 +1482,7 @@ We want to have a look that matches our icons in the tool-bar */ .rating { -fx-skin: "org.jabref.gui.util.CustomRatingSkin"; - -fx-padding: 0.5em 0px 0px 0px; + -fx-padding: 0.5em 0.0em 0.0em 0.0em; } .rating > .container > .button { @@ -1502,8 +1507,6 @@ We want to have a look that matches our icons in the tool-bar */ -fx-background-radius: 10; } -/* region: fix for making text area round corners (source: https://stackoverflow.com/a/49617953) */ - .chat-message-text-area .scroll-pane { -fx-background-color: transparent; } @@ -1516,10 +1519,7 @@ We want to have a look that matches our icons in the tool-bar */ -fx-background-color: transparent; } -/* endregion */ - -/* region: maintable css */ - +/* MainTable */ .main-table .column-icon { -fx-alignment: baseline-center; @@ -1589,13 +1589,12 @@ We want to have a look that matches our icons in the tool-bar */ .main-table .table-row-cell:matching-search-and-groups:odd { -fx-background-color: -jr-match-1-odd; } -.main-table .table-row-cell:matching-search-and-groups:odd:selected, -.main-table .table-row-cell:matching-search-and-groups:odd:focused, -.main-table .table-row-cell:matching-search-and-groups:odd:focused:hover, +.main-table .table-row-cell:matching-search-and-groups:selected, +.main-table .table-row-cell:matching-search-and-groups:focused, .main-table .table-row-cell:matching-search-and-groups:focused:hover { -fx-background-color: -jr-selected; } -.main-table .table-row-cell:matching-search-and-groups:odd:hover { +.main-table .table-row-cell:matching-search-and-groups:hover { -fx-background-color: -jr-hover; } @@ -1626,13 +1625,13 @@ We want to have a look that matches our icons in the tool-bar */ .main-table .table-row-cell:matching-search-not-groups:odd { -fx-background-color: -jr-match-2-odd; } -.main-table .table-row-cell:matching-search-not-groups:odd:selected, -.main-table .table-row-cell:matching-search-not-groups:odd:focused, -.main-table .table-row-cell:matching-search-not-groups:odd:focused:hover, -.main-table .table-row-cell:matching-search-not-groups:focused:hover { +.main-table .table-row-cell:matching-search-not-groups:selected, +.main-table .table-row-cell:matching-search-not-groups:focused, +.main-table .table-row-cell:matching-search-not-groups:focused:hover, +.main-table .table-row-cell:matching-search-not-groups:hover { -fx-background-color: -jr-selected; } -.main-table .table-row-cell:matching-search-not-groups:odd:hover { +.main-table .table-row-cell:matching-search-not-groups:hover { -fx-background-color: -jr-hover; } @@ -1663,13 +1662,13 @@ We want to have a look that matches our icons in the tool-bar */ .main-table .table-row-cell:matching-groups-not-search:odd { -fx-background-color: -jr-match-3-odd; } -.main-table .table-row-cell:matching-groups-not-search:odd:selected, -.main-table .table-row-cell:matching-groups-not-search:odd:focused, -.main-table .table-row-cell:matching-groups-not-search:odd:focused:hover, -.main-table .table-row-cell:matching-groups-not-search:focused:hover { +.main-table .table-row-cell:matching-groups-not-search:selected, +.main-table .table-row-cell:matching-groups-not-search:focused, +.main-table .table-row-cell:matching-groups-not-search:focused:hover, +.main-table .table-row-cell:matching-groups-not-search:hover { -fx-background-color: -jr-selected; } -.main-table .table-row-cell:matching-groups-not-search:odd:hover { +.main-table .table-row-cell:matching-groups-not-search:hover { -fx-background-color: -jr-hover; } @@ -1700,13 +1699,12 @@ We want to have a look that matches our icons in the tool-bar */ .main-table .table-row-cell:not-matching-search-and-groups:odd { -fx-background-color: -jr-match-4-odd; } -.main-table .table-row-cell:not-matching-search-and-groups:odd:selected, -.main-table .table-row-cell:not-matching-search-and-groups:odd:focused, -.main-table .table-row-cell:not-matching-search-and-groups:odd:focused:hover, +.main-table .table-row-cell:not-matching-search-and-groups:selected, +.main-table .table-row-cell:not-matching-search-and-groups:focused, .main-table .table-row-cell:not-matching-search-and-groups:focused:hover { -fx-background-color: -jr-selected; } -.main-table .table-row-cell:not-matching-search-and-groups:odd:hover { +.main-table .table-row-cell:not-matching-search-and-groups:hover { -fx-background-color: -jr-hover; } @@ -1732,5 +1730,696 @@ We want to have a look that matches our icons in the tool-bar */ -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.6), 8, 0.0, 0, 0); } +/* AboutDialog */ +#aboutDialog .about-heading { + -fx-font-size: 30; + -fx-text-fill: -jr-theme; +} + +#aboutDialog .about-heading:pressed { + -fx-text-fill: -jr-selected; +} + +#aboutDialog .top-padding { + -fx-padding: 5 0 0 0; +} + +#aboutDialog .dev-heading { + -fx-font-size: 18; + -fx-padding: -10 0 0 0; +} + +#aboutDialog .sub-heading { + -fx-font-size: 18; + -fx-padding: 0.312em; +} + +#aboutDialog .about-top { + -fx-padding: 0 5 15 5; +} + +#aboutDialog .space { + -fx-padding: 0 5 0 5; +} + +#aboutDialog .space-after { + -fx-padding: 0 5 0 0; +} + +#aboutDialog .info-sections { + -fx-padding: 0.312em; +} + +#aboutDialog .contrib-section { + -fx-padding: 5 5 10 5; +} + +#aboutDialog .logo-pane { + -fx-fill: transparent; +} + +#aboutDialog .logo-pane SVGPath { + -fx-fill: #4f5f8f; +} + +/* DocumentViewer */ +#documentViewerDialog #mainPane { + -fx-background-color: -fx-accented-background; + -fx-padding: 0; +} + +#documentViewerDialog .document-viewer .page { + -fx-padding: 0em 0em 1em 0em; + -fx-background-insets: 0; +} + +/* EntryEditor */ +#entryEditor .editorPane { + -fx-hgap: 10; + -fx-vgap: 6; + -fx-background-color: -fx-control-inner-background; + -fx-padding: 5 5 5 15; +} + +#entryEditor Text { + -fx-text-fill: -fx-text-base-color; + -fx-fill: -fx-text-base-color; +} + +#entryEditor .date-picker > .date-picker-display-node { + -fx-text-origin: baseline; +} + +#entryEditor .date-picker > .date-picker-display-node *.text { + -fx-text-origin: bottom; +} + +#entryEditor .combo-box > *.text { + -fx-text-origin: baseline; +} + +#entryEditor #typeLabel { + -fx-padding: 0.1em; + -fx-font-size: 1.166667em; + -fx-font-weight: bold; + -fx-text-fill: -jr-theme-text; +} + +#entryEditor #typeLabel:hover { + -fx-padding: 0.1em; + -fx-font-size: 1.166667em; + -fx-font-weight: bold; + -fx-background-color: -jr-icon-background-active; +} + +#entryEditor #typeLabel .context-menu { + -fx-font-size: 0.92em; + -fx-font-weight: normal; +} + +#entryEditor #typeLabel .tooltip { + -fx-font-size: 1em; + -fx-font-weight: normal; +} + +#entryEditor .icon-button.narrow { + -fx-padding: 0.1em; +} + +#entryEditor .icon-buttonNoSpaceBottom.narrow { + -fx-padding: 0.1em 0.1em -0.2em 0.1em; +} + +#entryEditor .icon-buttonNoSpaceTop.narrow { + -fx-padding: -0.2em 0.1em 0.1em 0.1em; +} + +#entryEditor .tool-bar { + -fx-background-color: -jr-background-alt; + -fx-background-insets: 0; +} + +#entryEditor .tool-bar .glyph-icon { + -glyph-size: 1.0em; + -fx-font-size: 2em; + -fx-fill: -jr-theme-text; + -fx-text-fill: -jr-theme-text; +} + +#entryEditor .warning-icon { + -fx-fill: -jr-warn; +} + +#entryEditor .error-icon { + -fx-text-fill: -jr-error; + -fx-fill: -jr-error; +} + +#entryEditor .tooltip-warning { + -fx-background-color: -jr-warn; +} + +#entryEditor .tooltip-error { + -fx-background-color: -jr-error; +} + +#entryEditor .code-area .context-menu { + -fx-font-family: sans-serif; +} + +#entryEditor #related-articles-tab { + -fx-padding: 20 20 20 20; + -fx-background-color: -fx-control-inner-background; +} + +#entryEditor .ai-tab { + -fx-padding: 20 20 20 20; + -fx-background-color: -fx-control-inner-background; +} + +#entryEditor .gdpr-notice { + -fx-border-color: -jr-warn; + -fx-border-insets: 5; + -fx-border-style: dashed; + -fx-border-width: 2; + -fx-padding: 12; + -fx-font-size: 1.3em; +} + +#entryEditor .recommendation-item { + -fx-padding: 0 0 0 20; +} + +#entryEditor #bibtexSourceCodeArea { + -fx-padding: 4 4 4 4; + -fx-background-color: -fx-control-inner-background; +} + +#entryEditor #bibtexSourceCodeArea .search { + -rtfx-background-color: #ffff00; + -fx-fill: #7800A9 ; + -fx-font-size: 1.2em; + -fx-font-weight: bolder; +} + +#entryEditor #citationsPane { + -fx-padding: 0; + -fx-background-color: -fx-control-inner-background; +} + +#entryEditor #citationsPane *, +#entryEditor #scitePane Label, +#entryEditor #scitePane Text { + -fx-fill: -fx-text-background-color; +} + +#entryEditor .heading { + -fx-font-size: 1.5em; + -fx-font-weight: bold; +} + +#entryEditor .description { + -fx-font-style: italic; +} + +#entryEditor .scite-tallies-label { + -fx-font-size: 1.5em; + -fx-font-weight: bold; +} + +#entryEditor .scite-error-box { + -fx-padding: 30 0 0 30; +} + +#entryEditor .scite-message-box { + -fx-padding: 30 0 0 30; +} + +#entryEditor #scite-error-label { + -fx-font-size: 1.5em; + -fx-font-weight: bold; + -fx-text-fill: -jr-error; +} + +/* ErrorConsole */ + +#errorConsole .list-content { + -fx-padding: 0.625em; +} + +#errorConsole .info-section { + -fx-padding: 0.625em; + -fx-background-color: -fx-background; +} + +#errorConsole .info-section .glyph-icon { + -fx-font-size: 24.0; +} + +#errorConsole .exception .glyph-icon { + -fx-font-size: 18.0; + -fx-fill: -jr-error; +} + +#errorConsole .output .glyph-icon { + -fx-font-size: 18.0; + -fx-fill: -jr-warn; +} + +#errorConsole .log .glyph-icon { + -fx-font-size: 18.0; + -fx-fill: -jr-info; +} + +#errorConsole .custom-buttons { + -fx-padding: 0.312em; +} + +#errorConsole .exception { + -fx-text-fill: -fx-text-base-color; +} + +#errorConsole .output { + -fx-text-fill: -fx-text-base-color; +} + +#errorConsole .log { + -fx-text-fill: -fx-text-base-color; +} + +/* GroupTree */ + +#groupTree:focused, +#groupTree:filled:selected { + -fx-background-color: -jr-sidepane-background; + -fx-table-cell-border-color: transparent; +} + +#groupTree, .tree-table-row-cell { + -fx-background-color: -jr-sidepane-background; +} + +#groupTree .tree-table-cell { + -fx-padding: 0.35em 0em 0.25em 0em; +} + +#groupTree .numberColumn { + -fx-alignment: top-right; + -fx-padding: 0.35em 0.2em 0.25em 0em; +} + +#groupTree .numberColumn > .hits { + -fx-font-size: 0.75em; + -fx-background-color: -jr-group-hits-bg; + -fx-padding: 0.4em 0.4em 0.4em 0.4em; + -fx-background-insets: 0; + -fx-background-radius: 0.7em; +} + +#groupTree .numberColumn > .hits .text { + -fx-fill: -jr-group-hits-fg; +} + +#groupTree .expansionNodeColumn { + -fx-alignment: top-right; +} + +#groupTree .tree-table-row-cell:dragOver-bottom { + -fx-border-color: -jr-drag-target; + -fx-border-width: 0 0 2 0; + -fx-padding: 0 0 -2 0; +} + +#groupTree .tree-table-row-cell:dragOver-center { + -fx-border-color: -jr-drag-target; + -fx-border-width: 1 1 1 1; + -fx-padding: -1 -1 -1 -1; + -fx-background-color: -jr-drag-target-hover; +} + +#groupTree .tree-table-row-cell:dragOver-top { + -fx-border-color: -jr-drag-target; + -fx-border-width: 2 0 0 0; + -fx-padding: -2 0 0 0; +} + +#groupTree .tree-table-row-cell:sub > .tree-table-cell { + -fx-padding: 0.20em 0em 0.20em 0em; +} + +#groupTree .tree-table-row-cell:sub > .numberColumn { + -fx-padding: 0.20em 0.2em 0.20em 0em; +} + +#groupTree .tree-table-row-cell:root { + -fx-border-width: 0 0 1 0; + -fx-border-color: -jr-separator; +} + +#groupTree .tree-table-row-cell:root > .tree-table-cell { + -fx-padding: 0.65em 0em 0.65em 1em; +} + +#groupTree .tree-table-row-cell:root > .numberColumn { + -fx-padding: 0.40em 0.2em 0.40em 0em; +} + +#groupTree .tree-table-row-cell:root > .expansionNodeColumn { + -fx-padding: 0.45em 0.2em 0.45em 0.2em; +} + +#groupTree .tree-table-row-cell:empty { + -fx-background-color: transparent; /* hide cells which are not bound to a group */ +} + +#groupTree .column-header-background { + visibility: hidden; /* hide column header */ + -fx-padding: -0.8em; +} + +#groupTree .tree-table-row-cell > .tree-table-cell > .tree-disclosure-node > .arrow { + -fx-background-color: -fx-mid-text-color; + -fx-max-height: 0.5em; + -fx-max-width: 0.5em; + -fx-padding: 0.333333em 0.229em 0.333333em 0.229em; /* 4 */ + -fx-shape: "m64,416l96,96l256,-256l-256,-256l-96,96l160,160l-160,160z"; +} + +#groupTree .tree-table-row-cell:expanded > .tree-table-cell > .tree-disclosure-node > .arrow { + -fx-rotate: 90; +} + +#groupTree .tree-table-row-cell > .tree-table-cell > .icon { + -fx-translate-x: -0.4em; +} + +#groupFilterBar { + -fx-background-color: -jr-sidepane-header-background; + -fx-border-color: -jr-separator; + -fx-border-width: 1 0 0 0; + -fx-padding: 0em 1em 0em 1em; +} + +#groupFilterBar .glyph-icon { + -fx-font-size: 2em; +} + +#groupBar .glyph-icon { + -fx-font-size: 2em; +} + +/* ImportEntriesDialog */ + +#importEntriesDialog .addEntryButton { + -fx-font-size: 2em; +} + +#importEntriesDialog .addEntryButton:selected { + -fx-background-color: transparent; + -fx-fill: -jr-selected; +} + +#importEntriesDialog .entry-container { + -fx-padding: 0.5em 0em 0.5em 0em; +} + +/* ManageStudyDefinition */ + +.slr-tab { + -fx-padding: 1em; +} + +/* MultiMergeEntries */ + +#multiMergeEntries .text-changed { + -fx-fill: -jr-orange; +} + +#multiMergeEntries .text-added { + -fx-fill: -jr-green; +} + +#multiMergeEntries .text-removed { + -fx-fill: -jr-red; +} + +#multiMergeEntries .grid-pane { + -fx-hgap: 10; + -fx-vgap: 10; +} + +#multiMergeEntries .toggle-button { + -fx-border-insets: 0; + -fx-background-insets: 0; + -fx-border-image-insets: 0; + -fx-padding: 0.5em; + -fx-background-radius: 0; +} + +#multiMergeEntries .box { + -fx-spacing: 10; +} + +/* ParseLatexResult */ + +#referenceListView { + -fx-background-color: -jr-sidepane-background; +} + +#referenceListView > .virtual-flow > .clipped-container > .sheet > .list-cell { + -fx-padding: 4 4 4 4; + -fx-background: transparent; + -fx-text-fill: -fx-text-base-color; +} + +#referenceListView > .virtual-flow > .clipped-container > .sheet > .list-cell * { + -fx-text-fill: -fx-text-base-color; +} + +#parseLatexResultDialog > .split-pane > .split-pane-divider { + -fx-padding: 0 4 0 4; + -fx-background-color: transparent; +} + +#parseLatexResultDialog .button-bar > .container { + -fx-border-width: 1 0 0 0; + -fx-border-color: -jr-sidepane-background; +} + +/* PreferenceDialog */ +#preferencesDialog #sidepane { + -fx-background-color: -jr-sidepane-background; +} + +#preferencesDialog #preferenceTabList { + -fx-background-color: transparent; +} + +#preferencesDialog #preferenceTabList > .virtual-flow > .clipped-container > .sheet > .list-cell { + -fx-padding: 8 8 8 8; + -fx-background: transparent; + -fx-text-fill: -fx-text-base-color; +} + +#preferencesDialog .button-bar > .container { + -fx-border-width: 1 0 0 0; + -fx-border-color: -jr-sidepane-background; +} + +#preferencesDialog #preferenceTabList > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected { + -fx-background: -fx-control-inner-background; +} + +#preferencesDialog > .split-pane > .split-pane-divider { + -fx-padding: 0 4 0 4; + -fx-background-color: transparent; +} + +#preferencesDialog .preferencesTab { + -fx-padding: 0.5em; +} + +#preferencesDialog *:search-highlight { + -fx-background-color: -jr-light-red; +} -/* endregion */ +#preferencesDialog .code-area { + -fx-padding: 0; + -fx-border-width: 1; + -fx-background-color: transparent; +} + +#preferencesDialog .code-area .text { + -fx-fill: -fx-text-background-color; +} + +#preferencesDialog .code-area .tagmark { + -fx-fill: gray; +} + +#preferencesDialog .code-area .anytag { + -fx-fill: crimson; +} + +#preferencesDialog .code-area .paren { + -fx-fill: firebrick; + -fx-font-weight: bold; +} + +#preferencesDialog .code-area .attribute { + -fx-fill: darkviolet; +} + +#preferencesDialog .code-area .avalue { + -fx-fill: green; +} + +#preferencesDialog .code-area .comment { + -fx-fill: teal; +} + +#preferencesDialog .code-area .highlight-keyword { + -fx-text-fill: -jr-purple; +} + +#preferencesDialog .code-area .context-menu .menu-item .label { + -fx-padding: 2; +} + +/* CitationRelationsTab */ + +#citationRelationsTab .addEntryButton { + -fx-font-size: 2em; +} + +#citationRelationsTab .addEntryButton:selected { + -fx-background-color: transparent; + -fx-fill: -jr-selected; +} + +#citationRelationsTab .entry-container { + -fx-padding: 0.5em 0em 0.5em 0em; +} + +/* JournalInfo */ +.journalInfo { + -fx-background-color: -jr-background-alt; +} + +.journalInfo .info-heading { + -fx-font-size: 2.5em; + -fx-text-fill: -jr-theme; +} + +.journalInfo .info-label { + -fx-font-size: 1.25em; + -fx-text-fill: -jr-theme; +} + +.journalInfo .hIndex { + -fx-font-size: 2em; +} + +.journalInfo .grid-cell { + -fx-border-color: transparent -fx-outer-border -fx-outer-border transparent; + -fx-border-width: 0 0.062em 0.062em 0; +} + +.journalInfo .grid-cell-r { + -fx-border-color: transparent -fx-outer-border transparent transparent; + -fx-border-width: 0 0.062em 0 0; +} + +journalInfo .grid-cell-b { + -fx-border-color: transparent transparent -fx-outer-border transparent; + -fx-border-width: 0 0 0.062em 0; +} + +/* KeyBindingsTab */ + +.keybinding-table { + -fx-table-cell-border-color: transparent; + -fx-background-color: transparent; +} + +.keybinding-table .tree-table-row-cell { + -fx-background-color: transparent; + /* visibility: hidden; */ +} + +.keybinding-table .tree-table-row-cell:selected > .tree-table-cell > .icon, +.keybinding-table .tree-table-row-cell:pressed > .tree-table-cell > .icon { + -fx-fill: white; +} + +/* ThreeWayMergeView */ +.three-way-merge .merged-field .styled-text-area { + -fx-background-color: -fx-outer-border, -fx-control-inner-background; + -fx-background-insets: 0, 1; + -fx-prompt-text-fill: -fx-mid-text-color; +} + +.three-way-merge .merged-field .styled-text-area:focused { + -fx-highlight-fill: derive(-jr-accent, 20%); + -fx-background-color: -jr-accent, -fx-control-inner-background; + -fx-background-insets: 0, 2; + -fx-highlight-text-fill: -fx-text-inner-color; +} + +.three-way-merge .merge-field-value:selected .selection-box { + -fx-background-color: -jr-accent-alt; + -fx-border-color: -jr-accent; +} + +.three-way-merge .merge-field-value .selection-box { + -fx-background-color: #0000; + -fx-border-color: #0000; + -fx-border-radius: 8; + -fx-background-radius: 8; + -fx-border-width: 2.5; +} + +.three-way-merge .styled-text-area .text{ + -fx-fill: -fx-text-background-color; +} + +.three-way-merge .field-cell:odd { + -fx-background-color: -jr-row-odd-background; +} + +.three-way-merge .field-cell:even { + -fx-background-color: -jr-row-even-background; +} + +.three-way-merge .field-cell { + -fx-padding: 8; +} + +.three-way-merge .merge-toolbox { + -fx-background-color: -jr-menu-background; +} + +.three-way-merge .merge-header-cell .label{ + -fx-font-weight: bold; + -fx-padding: 1, 0, 1, 0; +} + +.three-way-merge .field-name .glyph-icon, +.three-way-merge .field-name .ikonli-font-icon { + -fx-icon-size: 17; + -fx-icon-color: -jr-theme-text; +} + +/* Miscellaneous */ + +.chatHistory { + -fx-border-color: black; +} + +#styleSelectDialog .currentStyleLabel { + -fx-font-size: 1em; +} + +#styleSelectDialog .currentStyleNameLabel { + -fx-font-size: 1em; -fx-font-weight: bold; -fx-text-fill: -jr-theme; +} diff --git a/src/main/java/org/jabref/gui/JabRefGUI.java b/src/main/java/org/jabref/gui/JabRefGUI.java index be4054302ff..b621e4cb97f 100644 --- a/src/main/java/org/jabref/gui/JabRefGUI.java +++ b/src/main/java/org/jabref/gui/JabRefGUI.java @@ -30,6 +30,7 @@ import org.jabref.logic.ai.AiService; import org.jabref.logic.l10n.Localization; import org.jabref.logic.net.ProxyRegisterer; +import org.jabref.logic.os.OS; import org.jabref.logic.remote.RemotePreferences; import org.jabref.logic.remote.server.RemoteListenerServerManager; import org.jabref.logic.search.PostgreServer; @@ -287,13 +288,19 @@ public void onHiding(WindowEvent event) { private void saveWindowState() { CoreGuiPreferences preferences = JabRefGUI.preferences.getGuiPreferences(); - if (!mainStage.isMaximized()) { + // workaround for mac, maximize will always report true + if (!mainStage.isMaximized() || OS.OS_X) { preferences.setPositionX(mainStage.getX()); preferences.setPositionY(mainStage.getY()); preferences.setSizeX(mainStage.getWidth()); preferences.setSizeY(mainStage.getHeight()); } - preferences.setWindowMaximised(mainStage.isMaximized()); + // maximize does not correctly work on OSX, reports true, although the window was resized! + if (OS.OS_X) { + preferences.setWindowMaximised(false); + } else { + preferences.setWindowMaximised(mainStage.isMaximized()); + } debugLogWindowState(mainStage); } diff --git a/src/main/java/org/jabref/gui/LibraryTab.java b/src/main/java/org/jabref/gui/LibraryTab.java index 5c2041a8eb3..6ebbceda379 100644 --- a/src/main/java/org/jabref/gui/LibraryTab.java +++ b/src/main/java/org/jabref/gui/LibraryTab.java @@ -590,9 +590,6 @@ public void showAndEdit(BibEntry entry) { entryEditor.requestFocus(); } - /** - * Removes the bottom component. - */ public void closeBottomPane() { mode = PanelMode.MAIN_TABLE; splitPane.getItems().remove(entryEditor); @@ -945,8 +942,7 @@ public void pasteEntry() { private List handleNonBibTeXStringData(String data) { try { return this.importHandler.handleStringData(data); - } catch ( - FetcherException exception) { + } catch (FetcherException exception) { if (exception instanceof FetcherClientException) { dialogService.showInformationDialogAndWait(Localization.lang("Look up identifier"), Localization.lang("No data was found for the identifier")); } else if (exception instanceof FetcherServerException) { diff --git a/src/main/java/org/jabref/gui/actions/ActionHelper.java b/src/main/java/org/jabref/gui/actions/ActionHelper.java index 437d38d9bfe..16ffd8050c5 100644 --- a/src/main/java/org/jabref/gui/actions/ActionHelper.java +++ b/src/main/java/org/jabref/gui/actions/ActionHelper.java @@ -29,6 +29,11 @@ public static BooleanExpression needsDatabase(StateManager stateManager) { return stateManager.activeDatabaseProperty().isPresent(); } + public static BooleanExpression needsSavedLocalDatabase(StateManager stateManager) { + EasyBinding binding = EasyBind.map(stateManager.activeDatabaseProperty(), context -> context.filter(c -> c.getLocation() == DatabaseLocation.LOCAL && c.getDatabasePath().isPresent()).isPresent()); + return BooleanExpression.booleanExpression(binding); + } + public static BooleanExpression needsSharedDatabase(StateManager stateManager) { EasyBinding binding = EasyBind.map(stateManager.activeDatabaseProperty(), context -> context.filter(c -> c.getLocation() == DatabaseLocation.SHARED).isPresent()); return BooleanExpression.booleanExpression(binding); @@ -49,7 +54,7 @@ public static BooleanExpression needsEntriesSelected(StateManager stateManager) public static BooleanExpression needsEntriesSelected(int numberOfEntries, StateManager stateManager) { return Bindings.createBooleanBinding(() -> stateManager.getSelectedEntries().size() == numberOfEntries, - stateManager.getSelectedEntries()); + stateManager.getSelectedEntries()); } public static BooleanExpression isFieldSetForSelectedEntry(Field field, StateManager stateManager) { diff --git a/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.fxml b/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.fxml index a479ace35e6..bd222d360f9 100644 --- a/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.fxml +++ b/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.fxml @@ -11,56 +11,43 @@ - + - + - - - - + + + - - - - - - - - + + + + + + diff --git a/src/main/java/org/jabref/gui/ai/components/aichat/chathistory/ChatHistoryComponent.fxml b/src/main/java/org/jabref/gui/ai/components/aichat/chathistory/ChatHistoryComponent.fxml index 20836e0e3bb..0c6adb56cb9 100644 --- a/src/main/java/org/jabref/gui/ai/components/aichat/chathistory/ChatHistoryComponent.fxml +++ b/src/main/java/org/jabref/gui/ai/components/aichat/chathistory/ChatHistoryComponent.fxml @@ -3,19 +3,14 @@ - - + + - + diff --git a/src/main/java/org/jabref/gui/ai/components/aichat/chatmessage/ChatMessageComponent.fxml b/src/main/java/org/jabref/gui/ai/components/aichat/chatmessage/ChatMessageComponent.fxml index 92f428872d1..cf56ad0d56b 100644 --- a/src/main/java/org/jabref/gui/ai/components/aichat/chatmessage/ChatMessageComponent.fxml +++ b/src/main/java/org/jabref/gui/ai/components/aichat/chatmessage/ChatMessageComponent.fxml @@ -10,35 +10,31 @@ - - - - - - - - - - - - + + + + + + + + + - - - - - - - + + + + diff --git a/src/main/java/org/jabref/gui/ai/components/privacynotice/PrivacyNoticeComponent.fxml b/src/main/java/org/jabref/gui/ai/components/privacynotice/PrivacyNoticeComponent.fxml index a4f4da47cc2..543571673f4 100644 --- a/src/main/java/org/jabref/gui/ai/components/privacynotice/PrivacyNoticeComponent.fxml +++ b/src/main/java/org/jabref/gui/ai/components/privacynotice/PrivacyNoticeComponent.fxml @@ -1,97 +1,22 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +