diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 226bf3a6f53..84c48007971 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,13 +10,16 @@ updates: ignore: - dependency-name: com.microsoft.azure:applicationinsights-core versions: - - ">= 2.5.a, <= 2.6.1" # Blocked by https://github.com/microsoft/ApplicationInsights-Java/issues/1155 + - ">= 2.5.a" # Blocked by https://github.com/microsoft/ApplicationInsights-Java/issues/1155 - dependency-name: com.microsoft.azure:applicationinsights-logging-log4j2 versions: - - ">= 2.5.a, <= 2.6.1" # Blocked by https://github.com/microsoft/ApplicationInsights-Java/issues/1155 + - ">= 2.5.a" # Blocked by https://github.com/microsoft/ApplicationInsights-Java/issues/1155 - dependency-name: de.jensd:fontawesomefx-materialdesignfont versions: - "> 1.7.22-4" # Strange versioning format + - dependency-name: org.fxmisc.richtext:richtextfx + versions: + - "< 0.10.6" # Blocked by https://github.com/FXMisc/RichTextFX/issues/967, wait for new release - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 3002597009d..b8f22170b1b 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -11,12 +11,12 @@ jobs: id: waitforstatuschecks uses: "WyriHaximus/github-action-wait-for-status@v1.2" with: - ignoreActions: automerge + ignoreActions: Automerge Dependabot checkInterval: 13 env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: Merge pull requests - uses: pascalgn/automerge-action@v0.10.0 + uses: pascalgn/automerge-action@v0.12.0 if: steps.waitforstatuschecks.outputs.status == 'success' env: MERGE_METHOD: "squash" diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 7f729318063..6689341b25a 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -55,10 +55,16 @@ jobs: - name: Run GitVersion id: gitversion uses: gittools/actions/gitversion/execute@v0.9.4 - - name: Set up JDK + - name: Set up JDK 15 for linux and mac uses: actions/setup-java@v1 with: java-version: 15 + if: matrix.os != 'windows-latest' + - name: Set up JDK 14 for windows + uses: actions/setup-java@v1 + with: + java-version: 14 + if: matrix.os == 'windows-latest' - name: Restore gradle cache uses: actions/cache@master with: diff --git a/AUTHORS b/AUTHORS index a45d8fecd84..48da52cdc5b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -29,6 +29,7 @@ Andreas Amann Andreas Buhr Andreas Rudert Andrew Collins +Andrew Kuncevich Andrew Levit André Schlichting Andrés Sánchez @@ -112,6 +113,7 @@ Eiswindyeti Ellen Reitmayr Erdem Derebasoglu Erdem Derebaşoğlu +Eric Lau Erik Putrycz Ervin Kolenovic Escoul @@ -167,6 +169,7 @@ Jan Kubovy Jan Schäfer Janosch Kutscherauer Jason Pickering +Jasper Vandemalle Javier Muñoz Ferrara jcampbell11245 Jeff Kerr @@ -177,6 +180,7 @@ Jens Döcke joeyzgraggen Johannes Hupe Johannes Manner +Johannes Theiner John David John Relph John Zedlewski @@ -225,13 +229,13 @@ Lucas Beretti Luciana de Melo e Abud Lugduni Desrosiers Luis Romero -m-mauersberger Mairieli Wessel Malik Atalla Malte Deiseroth Manuel Siebeneicher Manuel Wtfjoke Marcel Luethi +Marco Aurélio Graciotto Silva Marco Konersmann Mariana Prudencio Marius Kleiner @@ -374,6 +378,7 @@ Tianjian Lei Tim Kilian Tim van Rossum Tim Würtele +Timucin Merdin Tobias Boceck Tobias Bouschen Tobias Denkinger diff --git a/CHANGELOG.md b/CHANGELOG.md index 379b0c9f22d..5c26f8942fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,12 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We added a query parser and mapping layer to enable conversion of queries formulated in simplified lucene syntax by the user into api queries. [#6799](https://github.com/JabRef/jabref/pull/6799) - We added some basic functionality to customise the look of JabRef by importing a css theme file. [#5790](https://github.com/JabRef/jabref/issues/5790) - We added connection check function in network preference setting [#6560](https://github.com/JabRef/jabref/issues/6560) +- We added a new fetcher to enable users to search jstor.org [#6627](https://github.com/JabRef/jabref/issues/6627) ### Changed +- We changed the default preferences for OpenOffice/LibreOffice integration to automatically sync the bibliography when +inserting new citations in a OpenOffic/LibreOffice document. [#6957](https://github.com/JabRef/jabref/issues/6957) - We restructured the 'File' tab and extracted some parts into the 'Linked files' tab [#6779](https://github.com/JabRef/jabref/pull/6779) - JabRef now offers journal lists from . JabRef the lists which use a dot inside the abbreviations. [#5749](https://github.com/JabRef/jabref/pull/5749) - We removed two useless preferences in the groups preferences dialog. [#6836](https://github.com/JabRef/jabref/pull/6836) @@ -29,18 +32,28 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We changed the title of the window "Manage field names and content" to have the same title as the corresponding menu item [#6895](https://github.com/JabRef/jabref/pull/6895) - We renamed the menus "View -> Previous citation style" and "View -> Next citation style" into "View -> Previous preview style" and "View -> Next preview style" and renamed the "Preview" style to "Customized preview style". [#6899](https://github.com/JabRef/jabref/pull/6899) - We changed the default preference option "Search and store files relative to library file location" to on, as this seems to be a more intuitive behaviour. [#6863](https://github.com/JabRef/jabref/issues/6863) -- Improved detection of "short" DOIs [6880](https://github.com/JabRef/jabref/issues/6880) +- We changed the title of the window "Manage field names and content": to have the same title as the corresponding menu item [#6895](https://github.com/JabRef/jabref/pull/6895) +- We improved the detection of "short" DOIs [6880](https://github.com/JabRef/jabref/issues/6880) +- We improved the duplicate detection when identifiers like DOI or arxiv are semantiaclly the same, but just syntactically differ (e.g. with or without http(s):// prefix). [#6707](https://github.com/JabRef/jabref/issues/6707) +- We changed in the group interface "Generate groups from keywords in a BibTeX field" by "Generate groups from keywords in the following field". [#6983](https://github.com/JabRef/jabref/issues/6983) +- We changed the name of a group type from "Searching for keywords" to "Searching for a keyword". [6995](https://github.com/JabRef/jabref/pull/6995) ### Fixed -- We fixed an issue changing the icon link_variation_off that is not meaningful. [#6834][https://github.com/JabRef/jabref/issues/6834] +- We fixed an issue changing the icon link_variation_off that is not meaningful. [#6834](https://github.com/JabRef/jabref/issues/6834) - We fixed an issue where the `.sav` file was not deleted upon exiting JabRef. [#6109](https://github.com/JabRef/jabref/issues/6109) - We fixed a linked identifier icon inconsistency. [#6705](https://github.com/JabRef/jabref/issues/6705) - We fixed the wrong behavior that font size changes are not reflected in dialogs. [#6039](https://github.com/JabRef/jabref/issues/6039) +- We fixed the failure to Copy citation key and link. [#5835](https://github.com/JabRef/jabref/issues/5835) - We fixed an issue where the sort order of the entry table was reset after a restart of JabRef. [#6898](https://github.com/JabRef/jabref/pull/6898) - We fixed an issue where no longer a warning was displayed when inserting references into LibreOffice with an invalid "ReferenceParagraphFormat". [#6907](https://github.com/JabRef/jabref/pull/60907). -- We fixed an issue where a selected field was not removed after the first click in the custom entry types dialog [#6934](https://github.com/JabRef/jabref/issues/6934) -- We fixed an issue where a remove icon was shown for standard entry types in the custom entry types dialog [6906](https://github.com/JabRef/jabref/issues/6906) +- We fixed an issue where a selected field was not removed after the first click in the custom entry types dialog. [#6934](https://github.com/JabRef/jabref/issues/6934) +- We fixed an issue where a remove icon was shown for standard entry types in the custom entry types dialog. [#6906](https://github.com/JabRef/jabref/issues/6906) +- We fixed an issue where it was impossible to connect to OpenOffice/LibreOffice on Mac OSX. [#6970](https://github.com/JabRef/jabref/pull/6970) +- We fixed an issue with the python script used by browser plugins that failed to locate JabRef if not installed in its default location. [#6963](https://github.com/JabRef/jabref/pull/6963/files) +- We fixed an issue where spaces and newlines in an isbn would generate an exception. [#6456](https://github.com/JabRef/jabref/issues/6456) +- We fixed an issue where identity column header had incorrect foreground color in the Dark theme. [#6796](https://github.com/JabRef/jabref/issues/6796) +- We fixed an issue where clicking on Collapse All button in the Search for Unlinked Local Files expanded the directory structure erroneously [#6848](https://github.com/JabRef/jabref/issues/6848) ### Removed diff --git a/build.gradle b/build.gradle index f2b53d6decd..d07d7af7392 100644 --- a/build.gradle +++ b/build.gradle @@ -12,11 +12,11 @@ import org.jabref.build.xjc.XjcTask plugins { id 'application' id "com.simonharrer.modernizer" version '2.1.0-1' - id 'me.champeau.gradle.jmh' version '0.5.1' + id 'me.champeau.gradle.jmh' version '0.5.2' id 'com.github.ben-manes.versions' version '0.33.0' id 'org.javamodularity.moduleplugin' version '1.7.0' id 'org.openjfx.javafxplugin' version '0.0.9' - id 'org.beryx.jlink' version '2.22.0' + id 'org.beryx.jlink' version '2.22.1' // nicer test outputs during running and completion // Homepage: https://github.com/radarsh/gradle-test-logger-plugin @@ -97,7 +97,7 @@ configurations { } javafx { - version = "14" + version = "15" modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.web', 'javafx.swing' ] } @@ -128,7 +128,7 @@ dependencies { libreoffice 'org.libreoffice:ridl:6.4.3' libreoffice 'org.libreoffice:unoil:6.4.3' - implementation 'io.github.java-diff-utils:java-diff-utils:4.7' + implementation 'io.github.java-diff-utils:java-diff-utils:4.8' implementation 'info.debatty:java-string-similarity:2.0.0' antlr3 'org.antlr:antlr:3.5.2' @@ -137,13 +137,13 @@ dependencies { antlr4 'org.antlr:antlr4:4.8-1' implementation 'org.antlr:antlr4-runtime:4.8-1' - implementation (group: 'org.apache.lucene', name: 'lucene-queryparser', version: '8.6.2') { + implementation (group: 'org.apache.lucene', name: 'lucene-queryparser', version: '8.6.3') { exclude group: 'org.apache.lucene', module: 'lucene-sandbox' } - implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.6.2' + implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.0' - implementation 'org.postgresql:postgresql:42.2.16' + implementation 'org.postgresql:postgresql:42.2.17' implementation ('com.oracle.ojdbc:ojdbc10:19.3.0.0') { // causing module issues @@ -163,14 +163,14 @@ dependencies { implementation 'de.saxsys:mvvmfx-validation:1.9.0-SNAPSHOT' implementation 'de.saxsys:mvvmfx:1.8.0' implementation 'com.tobiasdiez:easybind:2.1.0' - implementation 'org.fxmisc.flowless:flowless:0.6.1' - implementation 'org.fxmisc.richtext:richtextfx:0.10.5' + implementation 'org.fxmisc.flowless:flowless:0.6.2' + implementation 'org.fxmisc.richtext:richtextfx:0.10.4' implementation group: 'org.glassfish.hk2.external', name: 'jakarta.inject', version: '2.6.1' implementation 'com.jfoenix:jfoenix:9.0.10' implementation 'org.controlsfx:controlsfx:11.0.2' implementation 'org.jsoup:jsoup:1.13.1' - implementation 'com.konghq:unirest-java:3.10.00' + implementation 'com.konghq:unirest-java:3.11.01' implementation 'org.slf4j:slf4j-api:2.0.0-alpha1' implementation group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '3.0.0-SNAPSHOT' @@ -204,10 +204,10 @@ dependencies { testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.7.0' testImplementation 'org.junit.platform:junit-platform-launcher:1.7.0' - testImplementation 'net.bytebuddy:byte-buddy-parent:1.10.15' + testImplementation 'net.bytebuddy:byte-buddy-parent:1.10.17' testRuntime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT' testRuntime group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '3.0.0-SNAPSHOT' - testImplementation 'org.mockito:mockito-core:3.5.11' + testImplementation 'org.mockito:mockito-core:3.5.13' testImplementation 'org.xmlunit:xmlunit-core:2.7.0' testImplementation 'org.xmlunit:xmlunit-matchers:2.7.0' testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.14.1' @@ -216,7 +216,7 @@ dependencies { testImplementation "org.testfx:testfx-junit5:4.0.17-alpha-SNAPSHOT" testImplementation "org.hamcrest:hamcrest-library:2.2" - checkstyle 'com.puppycrawl.tools:checkstyle:8.36.1' + checkstyle 'com.puppycrawl.tools:checkstyle:8.36.2' xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.3' jython 'org.python:jython-standalone:2.7.2' } @@ -664,6 +664,7 @@ jlink { '--win-dir-chooser', '--win-shortcut', '--win-menu', + '--win-menu-group', "JabRef", '--temp', "$buildDir/installer", '--resource-dir', "${projectDir}/buildres/windows", '--file-associations', "${projectDir}/buildres/windows/bibtexAssociations.properties" diff --git a/buildres/linux/jabrefHost.py b/buildres/linux/jabrefHost.py index e1343e23207..ef3fd603b86 100755 --- a/buildres/linux/jabrefHost.py +++ b/buildres/linux/jabrefHost.py @@ -6,6 +6,7 @@ import json import logging +import os import platform import shlex import shutil @@ -16,11 +17,16 @@ # We assume that this python script is located in "jabref/lib" while the executable is "jabref/bin/JabRef" script_dir = Path(__file__).resolve().parent.parent -JABREF_PATH = script_dir / "bin/JabRef" -if not JABREF_PATH.exists(): - JABREF_PATH = shutil.which("jabref") - -if not JABREF_PATH.exists(): +relpath_path = script_dir / "bin/JabRef" +lowercase_path = shutil.which("jabref") +uppercase_path = shutil.which("JabRef") +if relpath_path.exists(): + JABREF_PATH = relpath_path +elif lowercase_path is not None and os.path.exists(lowercase_path): + JABREF_PATH = Path(lowercase_path) +elif uppercase_path is not None and os.path.exists(uppercase_path): + JABREF_PATH = Path(uppercase_path) +else: logging.error("Could not determine JABREF_PATH") sys.exit(-1) diff --git a/config/README.md b/config/README.md index 4088be4eff3..cb7d0275d0c 100644 --- a/config/README.md +++ b/config/README.md @@ -1,9 +1,9 @@ # IntelliJ IDEA Code Style Configuration IntelliJ IDEA comes with a powerful code formatter that helps you to keep the formatting consistent with the style JabRef uses. -Style-checks are done for each pull request and installing this cody style configuration helps you to ensure that this test passes. To install it, you need to do the following steps: +Style-checks are done for each pull request and installing this code style configuration helps you to ensure that this test passes. To install it, you need to do the following steps: -1. Goto *Preferences* or press Ctrl + Alt + S (Cmd + , on Mac OS X) +1. Go to *Preferences* or press Ctrl + Alt + S (Cmd + , on Mac OS X) 2. Go to "Editor > Code Style" 3. Click the gear (right of "Scheme: ...") 4. Click "Import Scheme >" diff --git a/docs/.gitbook/assets/intellij-choose-jdk-adoptopenjdk-on-windows-project-settings.png b/docs/.gitbook/assets/intellij-choose-jdk-adoptopenjdk-on-windows-project-settings.png new file mode 100644 index 00000000000..76207c5d3d6 Binary files /dev/null and b/docs/.gitbook/assets/intellij-choose-jdk-adoptopenjdk-on-windows-project-settings.png differ diff --git a/docs/.gitbook/assets/intellij-choose-jdk15-project-default.png b/docs/.gitbook/assets/intellij-choose-jdk15-project-default.png new file mode 100644 index 00000000000..ec031773c25 Binary files /dev/null and b/docs/.gitbook/assets/intellij-choose-jdk15-project-default.png differ diff --git a/docs/README.md b/docs/README.md index 096a6147596..5dc3b67c95e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -25,7 +25,7 @@ We are very happy that JabRef is part of [Software Engineering](https://en.wikip The package `org.jabref.cli` is responsible for handling the command line options. -During development, one can configure IntelliJ to pass command line paramters: +During development, one can configure IntelliJ to pass command line parameters: ![IntelliJ-run-configuration](.gitbook/assets/intellij-run-configuration-command-line%20%282%29.png) diff --git a/docs/adr.md b/docs/adr.md index 22678ad267e..988a2ba7593 100644 --- a/docs/adr.md +++ b/docs/adr.md @@ -15,7 +15,7 @@ Architectural decisions for JabRef: * [ADR-0010](https://github.com/JabRef/jabref/tree/master/docs/adr/0010-use-h2-as-internal-database.md) - Use H2 as Internal SQL Database * [ADR-0011](https://github.com/JabRef/jabref/tree/master/docs/adr/0011-test-external-links-in-documentation.md) - Test external links in documentation * [ADR-0012](https://github.com/JabRef/jabref/tree/master/docs/adr/0012-handle-different-bibEntry-formats-of-fetchers.md) - Handle different bibentry formats of fetchers by adding a layer -* [ADR-0013](https://github.com/JabRef/jabref/tree/master/docs/adr/0013-add-native-support-biblatex-software.md) - Add Native Support for BibLatex-Sotware +* [ADR-0013](https://github.com/JabRef/jabref/tree/master/docs/adr/0013-add-native-support-biblatex-software.md) - Add Native Support for BibLatex-Software fix checkstyle in adr * [ADR-0014](https://github.com/JabRef/jabref/tree/master/docs/adr/0014-separate-URL-creation-to-enable-proper-logging.md) - Separate URL creation to enable proper logging * [ADR-0015](https://github.com/JabRef/jabref/tree/master/docs/adr/0015-support-an-abstract-query-syntax-for-query-conversion.md) - Query syntax design diff --git a/docs/adr/0004-use-mariadb-connector.md b/docs/adr/0004-use-mariadb-connector.md index 31b4b6604d6..7d02b15aa6a 100644 --- a/docs/adr/0004-use-mariadb-connector.md +++ b/docs/adr/0004-use-mariadb-connector.md @@ -21,7 +21,7 @@ Chosen option: "Use MariaDB Connector", because comes out best \(see below\). The [MariaDB Connector](https://mariadb.com/kb/en/library/about-mariadb-connector-j/) is a LGPL-licensed JDBC driver to connect to MySQL and MariaDB. -* Good, because can be used as drop-in replacement for MySQL connectopr +* Good, because can be used as drop-in replacement for MySQL connector ### Use MySQL Connector diff --git a/docs/adr/0006-only-translated-strings-in-language-file.md b/docs/adr/0006-only-translated-strings-in-language-file.md index 2fd3ccfbc16..d7db17c5fac 100644 --- a/docs/adr/0006-only-translated-strings-in-language-file.md +++ b/docs/adr/0006-only-translated-strings-in-language-file.md @@ -2,7 +2,7 @@ ## Context and Problem Statement -JabRef has translation files `JabRef_it.properties`, ... There are translated and unstranslated strings. Which ones should be in the translation file? +JabRef has translation files `JabRef_it.properties`, ... There are translated and untranslated strings. Which ones should be in the translation file? ## Decision Drivers @@ -31,8 +31,8 @@ Chosen option: "Only translated strings in language file", because comes out bes ### Translated and untranslated strings in language file, have value the untranslated string to indicate untranslated * Good, because no issues with FXML -* Good, because Crowin supports it -* Bad, because untranslated strings cannot be identified easily in latin languages +* Good, because Crowdin supports it +* Bad, because untranslated strings cannot be identified easily in Latin languages ### Translated and untranslated strings in language file, have empty to indicate untranslated diff --git a/docs/adr/0008-use-public-final-instead-of-getters.md b/docs/adr/0008-use-public-final-instead-of-getters.md index daf781194ab..498fdd8c52b 100644 --- a/docs/adr/0008-use-public-final-instead-of-getters.md +++ b/docs/adr/0008-use-public-final-instead-of-getters.md @@ -19,4 +19,4 @@ Chosen option: "Offer public static field", because getters used to be a convent ### Negative Consequences -* new comers could get confused, because getters/setters are still teached +* newcomers could get confused, because getters/setters are still taught diff --git a/docs/adr/0011-test-external-links-in-documentation.md b/docs/adr/0011-test-external-links-in-documentation.md index b1b9756e799..070efb81550 100644 --- a/docs/adr/0011-test-external-links-in-documentation.md +++ b/docs/adr/0011-test-external-links-in-documentation.md @@ -26,18 +26,18 @@ Chosen option: "\[option 1\]", because \[justification. e.g., only option, which ### Negative Consequences -* Some external sites need to [be disabled](https://github.com/JabRef/jabref/pull/6542/files). For isntance, GitHub.com always returns "forbidden". A [filter for status is future work of the used tool](https://github.com/tcort/markdown-link-check/issues/94#issuecomment-634947466). +* Some external sites need to [be disabled](https://github.com/JabRef/jabref/pull/6542/files). For instance, GitHub.com always returns "forbidden". A [filter for status is future work of the used tool](https://github.com/tcort/markdown-link-check/issues/94#issuecomment-634947466). ## Pros and Cons of the Options ### Check external links once a month -* Good, because does not interfer with the normal development workflow +* Good, because does not interfere with the normal development workflow * Bad, because an additional workflow is required ### Check external links in the "checkstyle" task -* Good, because no seperate workflow is required +* Good, because no separate workflow is required * Bad, because checks fail independent of the PR (because external web sites can go down and go up independent of a PR) ### Do not check external links diff --git a/docs/adr/0013-add-native-support-biblatex-software.md b/docs/adr/0013-add-native-support-biblatex-software.md index f2fba184731..55f1b16af9a 100644 --- a/docs/adr/0013-add-native-support-biblatex-software.md +++ b/docs/adr/0013-add-native-support-biblatex-software.md @@ -1,4 +1,4 @@ -# Add Native Support for BibLatex-Sotware +# Add Native Support for BibLatex-Software * Deciders: Oliver Kopp @@ -6,8 +6,8 @@ Technical Story: [6574-Adding support for biblatex-software](https://github.com/ ## Context and Problem Statement -JabRef does not right now have support for Biblatex-Software out of the box, users have to add custome entry type. -With citing software becoming fairly common , native support is helpful. +Right now, JabRef does not have support for Biblatex-Software out of the box, users have to add custom entry types. +With citing software becoming fairly common, native support is helpful. ## Decision Drivers diff --git a/docs/adr/0014-separate-URL-creation-to-enable-proper-logging.md b/docs/adr/0014-separate-URL-creation-to-enable-proper-logging.md index 1b980e3abd2..13ce0bde380 100644 --- a/docs/adr/0014-separate-URL-creation-to-enable-proper-logging.md +++ b/docs/adr/0014-separate-URL-creation-to-enable-proper-logging.md @@ -45,7 +45,7 @@ Chosen option: "Separate URL creation", because comes out best \(see below\). } ``` -* Good, because exceptions thrown at method are directly catched +* Good, because exceptions thrown at method are directly caught * Good, because exceptions in different statements belong to different catch blocks * Good, because code to determine URL is written once * OK, because "Java by Comparison" does not state anything about it diff --git a/docs/adr/0015-support-an-abstract-query-syntax-for-query-conversion.md b/docs/adr/0015-support-an-abstract-query-syntax-for-query-conversion.md index f25f161c2ff..69b9664be8f 100644 --- a/docs/adr/0015-support-an-abstract-query-syntax-for-query-conversion.md +++ b/docs/adr/0015-support-an-abstract-query-syntax-for-query-conversion.md @@ -14,9 +14,9 @@ Which features should the syntax support? ## Decision Outcome -Chosen option: "Use a syntax that is derived of the lucene query syntax", because only option that is already known, and easy to implemenent. +Chosen option: "Use a syntax that is derived of the lucene query syntax", because only option that is already known, and easy to implement. Furthermore parsers for lucene already exist and are tested. -For simplicitly, and lack of universal capabilities across fetchers, only basic query features and therefor syntax is supported: +For simplicity, and lack of universal capabilities across fetchers, only basic query features and therefor syntax is supported: * All terms in the query are whitespace separated and will be ANDed * Default and certain fielded terms are supported diff --git a/docs/adr/0016-mutable-preferences-objects.md b/docs/adr/0016-mutable-preferences-objects.md index 6abb70af9c1..96fadaf5e6f 100644 --- a/docs/adr/0016-mutable-preferences-objects.md +++ b/docs/adr/0016-mutable-preferences-objects.md @@ -12,5 +12,5 @@ To create an immutable preferences object every time seems to be a waste of time ## Decision Outcome Chosen option: "Alter the exiting object", because the preferences objects are just wrappers around the basic preferences framework of JDK. They -should be mutable on-the-fly similar to objects with a Builder inside and to be stored immediatly again in the +should be mutable on-the-fly similar to objects with a Builder inside and to be stored immediately again in the preferences. diff --git a/docs/adr/0017-allow-model-access-logic.md b/docs/adr/0017-allow-model-access-logic.md index 5567fe198d4..bccb6650978 100644 --- a/docs/adr/0017-allow-model-access-logic.md +++ b/docs/adr/0017-allow-model-access-logic.md @@ -7,7 +7,7 @@ ## Decision Drivers -- New comers should find the architecture "split" natural +- Newcomers should find the architecture "split" natural - The architecture should be a help (and not a burden) ## Considered Options @@ -24,6 +24,10 @@ Chosen option: "`org.jabref.model` may use `org.jabref.logic` in defined cases", ### `org.jabref.model` uses `org.jabref.model` (and external libraries) only +The model package does not access logic or other packages of JabRef. +Access to classes of external libraries is allowed. +The logic package may use the model package. + - Good, because clear separation of model and logic - Bad, because this leads to an [Anemic Domain Model](https://martinfowler.com/bliki/AnemicDomainModel.html) @@ -31,7 +35,7 @@ Chosen option: "`org.jabref.model` may use `org.jabref.logic` in defined cases", - Good, because model and logic are still separated - Neutral, because each exception has to be discussed and agreed -- Bad, because new comers have to be informed that there are certain (agreed) exceptions for model to access logic +- Bad, because newcomers have to be informed that there are certain (agreed) exceptions for model to access logic ### `org.jabref.model` and `org.jabref.logic` may access each other freely diff --git a/docs/adr/0017-use-regular-expression-to-split-multiple-sentence-titles.md b/docs/adr/0017-use-regular-expression-to-split-multiple-sentence-titles.md new file mode 100644 index 00000000000..2b50f04b513 --- /dev/null +++ b/docs/adr/0017-use-regular-expression-to-split-multiple-sentence-titles.md @@ -0,0 +1,26 @@ +# Use regular expression to split multiple-sentence titles + +## Context and Problem Statement + +Some entry titles are composed of multiple sentences, for example: "Whose Music? A Sociology of Musical Language", therefore, it is necessary to first split the title into sentences and process them individually to ensure proper formatting using '[Sentence Case](https://en.wiktionary.org/wiki/sentence_case)' or '[Title Case](https://en.wiktionary.org/wiki/title_case#English)' + +## Considered Options + +* [Regular expression](https://docs.oracle.com/javase/tutorial/essential/regex/) +* [OpenNLP](https://opennlp.apache.org/) +* [ICU4J](http://site.icu-project.org/home) + +## Decision Outcome + +Chosen option: "Regular expression", because we can use Java internal classes (Pattern, Matcher) instead of adding additional dependencies + +### Positive Consequences + +* Less dependencies on third party libraries +* Smaller project size (ICU4J is very large) +* No need for model data (OpenNLP is a machine learning based toolkit and needs a trained model to work properly) + +### Negative Consequences + +* Regular expressions can never cover every case, therefore, splitting may not be accurate for every title + diff --git a/docs/adr/template.md b/docs/adr/template.md index b4974469854..255de8595c9 100644 --- a/docs/adr/template.md +++ b/docs/adr/template.md @@ -1,4 +1,4 @@ -# MADR Templae +# MADR Template The template of [MADR](https://adr.github.io/madr/) is available at . You can omit the `<-- optional -->` parts, which lead to a very minimal ADR: diff --git a/docs/advanced-reading/fetchers.md b/docs/advanced-reading/fetchers.md index b9310a4f0d5..e3256585127 100644 --- a/docs/advanced-reading/fetchers.md +++ b/docs/advanced-reading/fetchers.md @@ -1,6 +1,6 @@ # Working on fetchers -Fetchers are the implementation of the [search using online services](https://docs.jabref.org/collect/import-using-online-bibliographic-database). Some fetchers require API keys to get them working. To get the fetchers running in a JabRef development setup, the keys need to be placed in the respective enviornment variable. The following table lists the respective fetchers, where to get the key from and the environment variable where the key has to be placed. +Fetchers are the implementation of the [search using online services](https://docs.jabref.org/collect/import-using-online-bibliographic-database). Some fetchers require API keys to get them working. To get the fetchers running in a JabRef development setup, the keys need to be placed in the respective environment variable. The following table lists the respective fetchers, where to get the key from and the environment variable where the key has to be placed. | Service | Key Source | Environment Variable | Rate Limit | | :--- | :--- | :--- | :--- | diff --git a/docs/getting-into-the-code/code-howtos.md b/docs/getting-into-the-code/code-howtos.md index b1e0ca97980..8b5a452aaba 100644 --- a/docs/getting-into-the-code/code-howtos.md +++ b/docs/getting-into-the-code/code-howtos.md @@ -53,7 +53,7 @@ TODO: Usage of status bar and Swing Dialogs ### What the EventSystem is used for -Many times there is a need to provide an object on many locations simultaneously. This design pattern is quite similar to Java's Observer, but it is much simplier and readable while having the same functional sense. +Many times there is a need to provide an object on many locations simultaneously. This design pattern is quite similar to Java's Observer, but it is much simpler and readable while having the same functional sense. ### Main principle @@ -61,7 +61,7 @@ Many times there is a need to provide an object on many locations simultaneously ### Register to the `EventBus` -Any listening method has to be annotated with `@Subscribe` keyword and must have only one accepting parameter. Furthermore the object which contains such listening method\(s\) has to be registered using the `register(Object)` method provided by `EventBus`. The listening methods can be overloaded by using differnt parameter types. +Any listening method has to be annotated with `@Subscribe` keyword and must have only one accepting parameter. Furthermore the object which contains such listening method\(s\) has to be registered using the `register(Object)` method provided by `EventBus`. The listening methods can be overloaded by using different parameter types. ### Posting an object @@ -111,7 +111,7 @@ public class Main { ### Event handling in JabRef -The `event` package contains some specific events which occure in JabRef. +The `event` package contains some specific events which occur in JabRef. For example: Every time an entry was added to the database a new `EntryAddedEvent` is sent through the `eventBus` which is located in `BibDatabase`. @@ -175,7 +175,7 @@ The tests check whether translation strings appear correctly in the resource bun 1. Add new `Localization.lang("KEY")` to Java file. Run the `LocalizationConsistencyTest`under \(src/test/org.jabref.logic.l10n\) 2. Tests fail. In the test output a snippet is generated which must be added to the English translation file. There is also a snippet generated for the non-English files, but this is irrelevant. 3. Add snippet to English translation file located at `src/main/resources/l10n/JabRef_en.properties` -4. Please do not add tranlsations for other languages direclty in the properties. They will be overwritten by [Crowdin](https://crowdin.com/project/jabref) +4. Please do not add translations for other languages directly in the properties. They will be overwritten by [Crowdin](https://crowdin.com/project/jabref) ## Cleanup and Formatters @@ -300,7 +300,7 @@ public void getTypeReturnsBibLatexArticleInBibLatexMode() { } ``` -To test that a preferences migration works succesfully, use the mockito method `verify`. See `PreferencesMigrationsTest` for an example. +To test that a preferences migration works successfully, use the mockito method `verify`. See `PreferencesMigrationsTest` for an example. ## UI diff --git a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace.md b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace.md index 6f1083c7e12..4d90e5b9c0c 100644 --- a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace.md +++ b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace.md @@ -4,11 +4,11 @@ This guide explains how to set up your environment for development of JabRef. It ```text The most important step is to configure your IDE. -In case you know how to install JDK14 with JavaFX support and to fork JabRef's code, +In case you know how to install JDK15 with JavaFX support and to fork JabRef's code, please scroll down to the IDE setup. ``` -For a complete step-by-step guide for Linux using IntellJ IDEA as the IDE, have a look at the following video instructions: +For a complete step-by-step guide for Linux using IntelliJ IDEA as the IDE, have a look at the following video instructions: [![YouTube video showing the step-by-step guide](https://img.youtube.com/vi/JkFVJ6p0urw/mqdefault.jpg)](https://youtu.be/JkFVJ6p0urw) @@ -16,13 +16,14 @@ For a complete step-by-step guide for Linux using IntellJ IDEA as the IDE, have This section list the prerequisites you need to get started to develop JabRef. After this section, you are ready to get the code. -### Java Development Kit 14 +### Java Development Kit 15 -A working Java \(Develoment Kit\) 14 installation with Java FX support is required. In the command line \(terminal in Linux, cmd in Windows\) run `javac -version` and make sure that the reported version is Java 14 \(e.g `javac 14`\). If `javac` is not found or a wrong version is reported, check your PATH environment variable, your `JAVA_HOME` environment variable or install the most recent JDK. +A working Java \(Develoment Kit\) 15 installation with Java FX support is required. In the command line \(terminal in Linux, cmd in Windows\) run `javac -version` and make sure that the reported version is Java 15 \(e.g `javac 15`\). If `javac` is not found or a wrong version is reported, check your `PATH` environment variable, your `JAVA_HOME` environment variable or install the most recent JDK. -[JavaFX is not part of the default JDK any more](https://www.reddit.com/r/java/comments/82qm9x/javafx_will_be_removed_from_the_java_jdk_in_jdk_11/), it needs to be installed separately if not using a special JDK. We recommend to setup the full Liberica JDK including JavaFX. You can get it from [https://bell-sw.com/pages/downloads/?version=java-14&package=jdk-full](https://bell-sw.com/pages/downloads/?version=java-14&package=jdk-full). On Windows, you can execute `choco install libericajdkfull` \(requires [installation of chocolatey - a package manager for Windows](https://chocolatey.org/install)\). +[JavaFX is not part of the default JDK any more](https://www.reddit.com/r/java/comments/82qm9x/javafx_will_be_removed_from_the_java_jdk_in_jdk_11/), it needs to be installed separately if not using a special JDK. ~~We recommend to setup the full Liberica JDK including JavaFX. You can get it from [https://bell-sw.com/pages/downloads/?version=java-15&package=jdk-full](https://bell-sw.com/pages/downloads/?version=java-15&package=jdk-full). On Windows, you can execute `choco install libericajdkfull` \(requires [installation of chocolatey - a package manager for Windows](https://chocolatey.org/install)\).~~ (Liberica JDK 15 does not include the Java compiler properly any more) -Alternatively, you can download and install the JDK from [https://jdk.java.net/](https://jdk.java.net/). Afterwards, download download the "jmods" JavaFX 14 zip archive from [https://gluonhq.com/products/javafx/](https://gluonhq.com/products/javafx/) and put the `.jmod` files into `C:\Program Files\OpenJDK\jdk-14.0.1\jmods`. +Download and install the JDK from [https://jdk.java.net/](https://jdk.java.net/). +Afterwards, download the "jmods" JavaFX 15 zip archive from [https://gluonhq.com/products/javafx/](https://gluonhq.com/products/javafx/) and put the `.jmod` files into `C:\Program Files\OpenJDK\jdk-15\jmods`. ### GitHub Account @@ -34,9 +35,9 @@ Proposals for account names: * Use your last name prefixed by the first letter of your first name. Example: `okopp` * Use `firstname.lastname`. Example: `oliver.kopp` -You can hide your email adress by following the recommendations at [https://saraford.net/2017/02/19/how-to-hide-your-email-address-in-your-git-commits-but-still-get-contributions-to-show-up-on-your-github-profile-050/](https://saraford.net/2017/02/19/how-to-hide-your-email-address-in-your-git-commits-but-still-get-contributions-to-show-up-on-your-github-profile-050/). +You can hide your email address by following the recommendations at [https://saraford.net/2017/02/19/how-to-hide-your-email-address-in-your-git-commits-but-still-get-contributions-to-show-up-on-your-github-profile-050/](https://saraford.net/2017/02/19/how-to-hide-your-email-address-in-your-git-commits-but-still-get-contributions-to-show-up-on-your-github-profile-050/). -Most developers, though, do not hide their email adress. They use one mich may get public. Mostly, they create a new email account for development only. That account then be used for develoment mailing lists, mail exchange with other developers, etc. +Most developers, though, do not hide their email address. They use one which may get public. Mostly, they create a new email account for development only. That account then be used for development mailing lists, mail exchange with other developers, etc. Examples: @@ -54,9 +55,18 @@ It is strongly recommend that you have git installed. ### IDE -We suggest [IntelliJ IDEA](https://www.jetbrains.com/idea/) or [Eclipse \(for advanced users\)](https://eclipse.org/) \(`2020-03` or newer\). +We suggest [IntelliJ IDEA](https://www.jetbrains.com/idea/). +For advanced users, [Eclipse](https://eclipse.org/) \(`2020-09` or newer\) is also possible. -On Ubuntu Linux, you can follow the [documentation from the Ubuntu Community](https://help.ubuntu.com/community/EclipseIDE#Download_Eclipse) or the [step-by-step guideline from Krizna](https://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/) to install Eclipse. Under Windows, download it from [www.eclipse.org](http://www.eclipse.org/downloads/) and run the installer. +#### IntelliJ + +We recommend to install IntelliJ IDEA using [JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/), because IDE updates are automatically installed. + +#### Ecipse + +On Ubuntu Linux, you can follow the [documentation from the Ubuntu Community](https://help.ubuntu.com/community/EclipseIDE#Download_Eclipse) or the [step-by-step guideline from Krizna](https://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/) to install Eclipse. On Windows, download it from [www.eclipse.org](http://www.eclipse.org/downloads/) and run the installer. + +Eclipse JEE 2020-09 or newer is required. For Eclipse 2020-09 you need to install [Java 15 Support](https://marketplace.eclipse.org/content/java-15-support-eclipse-2020-09-417). ### Other Tooling @@ -86,9 +96,7 @@ This section explains how you get the JabRef code onto your machine in a form al These steps are very important. They allow you to focus on the content and ensure that the code formatting always goes well. Did you know that [IntelliJ allows for reformatting selected code](https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html#reformat_code) if you press Ctrl+Alt+L? -### Setup for IntelliJ IDEA - -We recommend to install IntelliJ IDEA using [JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/), because IDE updates are automatically installed. +### Configuration of IntelliJ IDEA IntelliJ IDEA fully supports Gradle as a build tool, but also has an internal build system which is usually faster. For JabRef, Gradle is required to make a full build but once set up, IntelliJ IDEA's internal system can be used for sub-sequent builds. @@ -96,12 +104,15 @@ To configure IntelliJ IDEA for developing JabRef, you should first ensure that y * Navigate to **File \| Settings \| Plugins \| Installed** and check that you have the _Gradle_ and _Gradle Extension_ enabled. -After that, you can open `jabref/build.gradle` as a project. It is crucial that Java 14 is used consistently for the JabRef project which includes ensuring the right settings for your project structure, Gradle build, and run configurations. +After that, you can open `jabref/build.gradle` as a project. It is crucial that Java 15 is used consistently for the JabRef project which includes ensuring the right settings for your project structure, Gradle build, and run configurations. + +Ensure you have a Java 15 SDK configured by navigating to **File \| Project Structure \| Platform Settings \| SDKs**. If you don't have one, add a new Java JDK and point it to the location of a JDK 15. +![Project Settings](../.gitbook/assets/intellij-choose-jdk-adoptopenjdk-on-windows-project-settings.png) -Ensure you have a Java 14 SDK configured by navigating to **File \| Project Structure \| Platform Settings \| SDKs**. If you don't have one, add a new Java JDK and point it to the location of a JDK 14: +Navigate to **File \| Project Structure \| Project** and ensure that the projects' SDK is Java 15 +![Use JDK 15 as project SDK](../.gitbook/assets/intellij-choose-jdk15-project-default.png) -* Navigate to **File \| Project Structure \| Project** and ensure that the projects' SDK is Java 14 -* Navigate to **File \| Settings \| Build, Execution, Deployment \| Build Tools \| Gradle** and select the Java 14 SDK as the Gradle JVM at the bottom. +Navigate to **File \| Settings \| Build, Execution, Deployment \| Build Tools \| Gradle** and select the "Project SDK" as the Gradle JVM at the bottom. To prepare IntelliJ's build system two additional steps are required: @@ -148,7 +159,7 @@ To use IntelliJ IDEA's internal build system when you build JabRef through **Bui ![Ignore the Gradle project "buildSrc"](../.gitbook/assets/intellij-gradle-config-ignore-buildSrc%20%282%29.png) -* Delete `org.jabref.gui.logging.plugins.Log4jPlugins` \(location: `generated\org\jabref\gui\logging\plugins\Log4jPlugins.java`\). Otherwise, you will see folowing error: +* Delete `org.jabref.gui.logging.plugins.Log4jPlugins` \(location: `generated\org\jabref\gui\logging\plugins\Log4jPlugins.java`\). Otherwise, you will see following error: ```text Error:java: Unable to create Plugin Service Class org.jabref.gui.logging.plugins.Log4jPlugins @@ -162,7 +173,7 @@ To use IntelliJ IDEA's internal build system when you build JabRef through **Bui Essentially, you now have the best of both worlds: You can run Gradle tasks using the Gradle Tool Window and unless you haven't made changes to input files that generate sources, you can compile and run with IntelliJ's faster internal build system. -In case all steps are followed, and there are still issues with `SearchBaseVisitor` \(e.g., `Error:(16, 25) java: package org.jabref.search does not exist`\), you have to delete `generated\org\jabref\gui\logging\plugins\Log4jPlugins.java`. This is independet of having enabled or disabled Annotation Processing \(see above at "Enable Annotation Processing"\). +In case all steps are followed, and there are still issues with `SearchBaseVisitor` \(e.g., `Error:(16, 25) java: package org.jabref.search does not exist`\), you have to delete `generated\org\jabref\gui\logging\plugins\Log4jPlugins.java`. This is independent of having enabled or disabled Annotation Processing \(see above at "Enable Annotation Processing"\). #### Using JabRef's code style @@ -174,15 +185,24 @@ Contributions to JabRef's source code need to have a code formatting that is con * Go to **File \| Settings \| Editor \| Code Style** * Click on the settings wheel \(next to the scheme chooser\), then click "Import Scheme" * Select the IntelliJ configuration file `config/IntelliJ Code Style.xml` -* Go to **File \| Settings \| Tools \| Checkstyle \| Configuration File** 1. Import the CheckStyle configuration file by clicking the \[+\] button 2. For the description provide "JabRef" 3. Click "Browse" and choose `config/checkstyle/checkstyle.xml` 4. Click "Next" and "Finish" 5. Activate the CheckStyle configuration file by ticking it in the list 6. Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected \(8.36 or higher\). 8.36 is required for Java 14. 7. Set the "Scan Scope" to "Only Java sources \(including tests\) 8. Save settings by clicking "OK" 9. Your configuration should now look like this: - ```text +Finally, ensure that the checkstyle configuration file is in place: + +1. Go to **File \| Settings \| Tools \| Checkstyle \| Configuration File** +2. Import the CheckStyle configuration file by clicking the \[+\] button +3. For the description provide "JabRef" +4. Click "Browse" and choose `config/checkstyle/checkstyle.xml` +5. Click "Next" and "Finish" +6. Activate the CheckStyle configuration file by ticking it in the list +7. Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected \(8.36 or higher\). 8.36 is required for Java 15. +8. Set the "Scan Scope" to "Only Java sources \(including tests\) +9. Save settings by clicking "OK" +10. Your configuration should now look like this: ![checkstyle settings](../.gitbook/assets/intellij-checkstyle-settings.png) - ``` ### Setup for Eclipse -Make sure your Eclipse installation us up to date, Eclipse JEE 2020-03 or newer is required. For Eclipse 2020-03 you need to install [jdk14 support](https://marketplace.eclipse.org/content/java-14-support-eclipse-2020-03-415) +Make sure your Eclipse installation us up to date. 1. Run `./gradlew run` to generate all resources and to check if JabRef runs. * The JabRef GUI should finally appear. @@ -234,7 +254,7 @@ Got it running? GREAT! You are ready to lurk the code and contribute to JabRef. ### Java installation -An indication that `JAVA_HOME` is not correctly set or no JDK 14 is installed is following error message: +An indication that `JAVA_HOME` is not correctly set or no JDK 15 is installed is following error message: ```text compileJava FAILED @@ -258,10 +278,12 @@ In rare cases you might encounter problems due to out-dated automatically genera ### Problems with openjfx libraries in local maven repository -There might be problems with building if you have opejfx libraries in local maven repository, resulting in errors like this: +There might be problems with building if you have openjfx libraries in local maven repository, resulting in errors like this: + ```text - > Could not find javafx-fxml-14-mac.jar (org.openjfx:javafx-fxml:14). + > Could not find javafx-fxml-15-mac.jar (org.openjfx:javafx-fxml:15). Searched in the following locations: - file:/repository/org/openjfx/javafx-fxml/14/javafx-fxml-14-mac.jar + file:/repository/org/openjfx/javafx-fxml/15/javafx-fxml-15-mac.jar ``` + As a workaround, you can remove all local openjfx artifacts by deleting the whole openjfx folder from specified location. diff --git a/docs/readings-on-coding/tools.md b/docs/readings-on-coding/tools.md index a96fe324106..08d98cf1b99 100644 --- a/docs/readings-on-coding/tools.md +++ b/docs/readings-on-coding/tools.md @@ -4,7 +4,7 @@ This page lists some software we consider useful. ## Browser plugins -* [Refined GitHub](https://github.com/sindresorhus/refined-github) - GitHub on stereoids +* [Refined GitHub](https://github.com/sindresorhus/refined-github) - GitHub on steroids * [GitHub Issue Link Status](https://github.com/fregante/github-issue-link-status) - proper coloring of linked issues and PRs. * [Codecov Browser Extension](https://github.com/codecov/browser-extension) - displaying code coverage directly when browsing GitHub * [Sourcegraph Browser Extension](https://docs.sourcegraph.com/integration/browser_extension) - Navigate through source on github diff --git a/docs/teaching.md b/docs/teaching.md index 41017b7a257..95f3327d493 100644 --- a/docs/teaching.md +++ b/docs/teaching.md @@ -2,7 +2,7 @@ With JabRef students can level-up their coding and GitHub skills. When taking part in JabRef development, one will learn modern Java coding practices, how code reviews work and how to properly address reviewing feedback. -JabRef tries to achieve high code quality. This ultimately leads to improved software engineering knowledge of contributors. After contributing for JabRef, both coding and general software engienering skills will have increased. Our [development strategy](getting-into-the-code/development-strategy.md) provides more details. +JabRef tries to achieve high code quality. This ultimately leads to improved software engineering knowledge of contributors. After contributing for JabRef, both coding and general software engineering skills will have increased. Our [development strategy](getting-into-the-code/development-strategy.md) provides more details. We recommend to start early and constantly, since students working earlier and more often produce projects that are more correct and completed earlier at the same overall invested time [1](teaching.md#Ayaankazerouni). @@ -17,8 +17,8 @@ We recommend to start early and constantly, since students working earlier and m * Feature Board: [https://github.com/JabRef/jabref/projects/7](https://github.com/JabRef/jabref/projects/7) * This is a general feature board. Recommended, if the board above is empty or you did not find something suitable * Bug Board: [https://github.com/JabRef/jabref/projects/5](https://github.com/JabRef/jabref/projects/5) - * This is an excellent board to find issues training the maintainance knowledge which is essential for industry work - * General "good first issues". The JabRef team tags issues as [good first issues](https://github.com/jabref/jabref/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) to indicate open tasks offering a good start into the JabRef code. These issues are more a list of random bugs and features. For a more structured comparison of the opened tasks, we recommend the projectd boards listed above. + * This is an excellent board to find issues training the maintenance knowledge which is essential for industry work + * General "good first issues". The JabRef team tags issues as [good first issues](https://github.com/jabref/jabref/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) to indicate open tasks offering a good start into the JabRef code. These issues are more a list of random bugs and features. For a more structured comparison of the opened tasks, we recommend the project boards listed above. 5. Be aware that the difficulty of bugs and feature vary. A task should be chosen with care. The JabRef team can help here: The majority of the team has experiences in teaching 6. Get in touch with the JabRef team to discuss details. We offer email, skype, [gitter.im](https://gitter.im/JabRef/jabref), discord. Get in touch with [@koppor](https://github.com/koppor/) to find the right channel and to start forming the success of your course. @@ -38,7 +38,7 @@ The process for accepting contributions is as below. The syntax is [BPMN](https: In short, the contribution is **reviewed by two JabRef developers**. Typically, they have constructive feedback on their contribution. This means, that the contributors get comments on their contribution enabling them to level-up their coding skill. Incorporating improvements takes time, too. The benefit is two-fold: a\) contributors improve their coding skills and b\) JabRef's code quality improves. All in all, we ask to respect the aims of the JabRef team and to reserve time to incorporate the reviewer's comments. -GitHub describes that in their page [Unterstanding the GitHub flow](https://guides.github.com/introduction/flow/): +GitHub describes that in their page [Understanding the GitHub flow](https://guides.github.com/introduction/flow/): [![GitHub flow](.gitbook/assets/github-flow%20%281%29.png)](https://github.com/JabRef/jabref/tree/ed275b62fe7dac57a086e43802e36deb93c63e31/docs/images/github-flow.png) diff --git a/scripts/generate-authors.sh b/scripts/generate-authors.sh index 6f00f12bb62..d38d5c4ba5e 100755 --- a/scripts/generate-authors.sh +++ b/scripts/generate-authors.sh @@ -58,5 +58,5 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.." # co-authors coauthors=$(git log -i --grep=co-authored-by | grep -i "co-authored-by" | sed "s/.*co-authored-by: \(.*\)/\1/I" | sed "s/ <.*//") - echo -e "$authors\n$(git log --format='%aN')\n$coauthors" | grep -v "\[bot\]" | grep -v "JabRef" | grep -v "Siedlerchr" | grep -v "^Christoph$" | grep -v "^Mootez$" | grep -v "oscargus" | grep -v "dependabot" | grep -v "github actions" | grep -v "igorsteinmacher" | grep -v "halirutan" | grep -v "matthiasgeiger" | grep -v "Gitter Badger" | grep -v "gdstewart" | grep -v "chenyuheng" | LC_ALL=C.UTF-8 sort --unique --ignore-case + echo -e "$authors\n$(git log --format='%aN')\n$coauthors" | grep -v "\[bot\]" | grep -v "JabRef" | grep -v "Siedlerchr" | grep -v "^Christoph$" | grep -v "^Mootez$" | grep -v "oscargus" | grep -v "dependabot" | grep -v "github actions" | grep -v "igorsteinmacher" | grep -v "halirutan" | grep -v "matthiasgeiger" | grep -v "Gitter Badger" | grep -v "gdstewart" | grep -v "m-mauersberger" | grep -v "chenyuheng" | LC_ALL=C.UTF-8 sort --unique --ignore-case } > AUTHORS diff --git a/snap/hooks/connect-plug-etc-chromium-native-messaging-jabref b/snap/hooks/connect-plug-etc-chromium-native-messaging-jabref index 2644fc7026a..bcd982e7c1d 100755 --- a/snap/hooks/connect-plug-etc-chromium-native-messaging-jabref +++ b/snap/hooks/connect-plug-etc-chromium-native-messaging-jabref @@ -1,6 +1,6 @@ #!/bin/sh -if [ ! -d /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts ]; then +if [ ! -d /etc/chromium/native-messaging-hosts ]; then echo "Missing directory, create it manually then try again:" echo "sudo mkdir -p /etc/chromium/native-messaging-hosts" exit 1 diff --git a/snap/hooks/connect-plug-etc-opt-chrome-native-messaging-jabref b/snap/hooks/connect-plug-etc-opt-chrome-native-messaging-jabref index 025087770a7..bb5d8c7ec18 100755 --- a/snap/hooks/connect-plug-etc-opt-chrome-native-messaging-jabref +++ b/snap/hooks/connect-plug-etc-opt-chrome-native-messaging-jabref @@ -1,6 +1,6 @@ #!/bin/sh -if [ ! -d /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts ]; then +if [ ! -d /etc/opt/chrome/native-messaging-hosts ]; then echo "Missing directory, create it manually then try again:" echo "sudo mkdir -p /etc/opt/chrome/native-messaging-hosts" exit 1 diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 2ad2009d218..e89c9a27680 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -1188,3 +1188,7 @@ TextFlow * { -fx-background-color: rgba(255, 159, 67, 0.5); } + +.mainTable-header{ + -fx-fill: -fx-mid-text-color; +} diff --git a/src/main/java/org/jabref/gui/ClipBoardManager.java b/src/main/java/org/jabref/gui/ClipBoardManager.java index 78f9e7aa39a..d78183a3479 100644 --- a/src/main/java/org/jabref/gui/ClipBoardManager.java +++ b/src/main/java/org/jabref/gui/ClipBoardManager.java @@ -73,7 +73,7 @@ public static void addX11Support(TextInputControl input) { // using InvalidationListener because of https://bugs.openjdk.java.net/browse/JDK-8176270 observable -> Platform.runLater(() -> { String newValue = input.getSelectedText(); - if (!newValue.isEmpty() && primary != null) { + if (!newValue.isEmpty() && (primary != null)) { primary.setContents(new StringSelection(newValue), null); } })); @@ -105,7 +105,7 @@ public static String getContents() { public static String getContentsPrimary() { if (primary != null) { Transferable contents = primary.getContents(null); - if (contents != null && contents.isDataFlavorSupported(DataFlavor.stringFlavor)) { + if ((contents != null) && contents.isDataFlavorSupported(DataFlavor.stringFlavor)) { try { return (String) contents.getTransferData(DataFlavor.stringFlavor); } catch (UnsupportedFlavorException | IOException e) { @@ -137,9 +137,10 @@ public void setPrimaryClipboardContent(ClipboardContent content) { } } - public void setHtmlContent(String html) { + public void setHtmlContent(String html, String fallbackPlain) { final ClipboardContent content = new ClipboardContent(); content.putHtml(html); + content.putString(fallbackPlain); clipboard.setContent(content); setPrimaryClipboardContent(content); } @@ -181,7 +182,7 @@ private List handleBibTeXData(String entries) { } private List handleStringData(String data) { - if (data == null || data.isEmpty()) { + if ((data == null) || data.isEmpty()) { return Collections.emptyList(); } diff --git a/src/main/java/org/jabref/gui/actions/StandardActions.java b/src/main/java/org/jabref/gui/actions/StandardActions.java index c3b6238d0f9..e3880399355 100644 --- a/src/main/java/org/jabref/gui/actions/StandardActions.java +++ b/src/main/java/org/jabref/gui/actions/StandardActions.java @@ -33,7 +33,7 @@ public enum StandardActions implements Action { OPEN_EXTERNAL_FILE(Localization.lang("Open file"), IconTheme.JabRefIcons.FILE, KeyBinding.OPEN_FILE), 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 BibTeX data from %0", "DOI/ISBN/...")), + MERGE_WITH_FETCHED_ENTRY(Localization.lang("Get bibliographic data from %0", "DOI/ISBN/...")), ATTACH_FILE(Localization.lang("Attach file"), IconTheme.JabRefIcons.ATTACH_FILE), PRIORITY(Localization.lang("Priority"), IconTheme.JabRefIcons.PRIORITY), CLEAR_PRIORITY(Localization.lang("Clear priority")), diff --git a/src/main/java/org/jabref/gui/edit/CopyMoreAction.java b/src/main/java/org/jabref/gui/edit/CopyMoreAction.java index ac138cf5a85..9ef0f292594 100644 --- a/src/main/java/org/jabref/gui/edit/CopyMoreAction.java +++ b/src/main/java/org/jabref/gui/edit/CopyMoreAction.java @@ -207,6 +207,7 @@ private void copyKeyAndLink() { List entries = stateManager.getSelectedEntries(); StringBuilder keyAndLink = new StringBuilder(); + StringBuilder fallbackString = new StringBuilder(); List entriesWithKey = entries.stream() .filter(BibEntry::hasCitationKey) @@ -222,9 +223,11 @@ private void copyKeyAndLink() { String url = entry.getField(StandardField.URL).orElse(""); keyAndLink.append(url.isEmpty() ? key : String.format("%s", url, key)); keyAndLink.append(OS.NEWLINE); + fallbackString.append(url.isEmpty() ? key : String.format("%s - %s", key, url)); + fallbackString.append(OS.NEWLINE); } - clipBoardManager.setHtmlContent(keyAndLink.toString()); + clipBoardManager.setHtmlContent(keyAndLink.toString(), fallbackString.toString()); if (entriesWithKey.size() == entries.size()) { // All entries had keys. diff --git a/src/main/java/org/jabref/gui/entryeditor/SourceTab.java b/src/main/java/org/jabref/gui/entryeditor/SourceTab.java index aba1aca5363..66c32a2ad25 100644 --- a/src/main/java/org/jabref/gui/entryeditor/SourceTab.java +++ b/src/main/java/org/jabref/gui/entryeditor/SourceTab.java @@ -133,7 +133,7 @@ private void highlightSearchPattern() { } } - private static String getSourceString(BibEntry entry, BibDatabaseMode type, FieldWriterPreferences fieldWriterPreferences) throws IOException { + private String getSourceString(BibEntry entry, BibDatabaseMode type, FieldWriterPreferences fieldWriterPreferences) throws IOException { StringWriter stringWriter = new StringWriter(200); FieldWriter fieldWriter = FieldWriter.buildIgnoreHashes(fieldWriterPreferences); new BibEntryWriter(fieldWriter, Globals.entryTypesManager).writeWithoutPrependedNewlines(entry, stringWriter, type); @@ -224,6 +224,7 @@ private void updateCodeArea() { codeArea.clear(); try { codeArea.appendText(getSourceString(currentEntry, mode, fieldWriterPreferences)); + codeArea.setEditable(true); highlightSearchPattern(); } catch (IOException ex) { codeArea.setEditable(false); diff --git a/src/main/java/org/jabref/gui/externalfiles/FindUnlinkedFilesDialog.java b/src/main/java/org/jabref/gui/externalfiles/FindUnlinkedFilesDialog.java index cbef3f235f6..66c97e29ef1 100644 --- a/src/main/java/org/jabref/gui/externalfiles/FindUnlinkedFilesDialog.java +++ b/src/main/java/org/jabref/gui/externalfiles/FindUnlinkedFilesDialog.java @@ -165,7 +165,7 @@ private void initialize() { buttonOptionCollapseAll.setOnAction(event -> { CheckBoxTreeItem root = (CheckBoxTreeItem) tree.getRoot(); expandTree(root, false); - root.setExpanded(true); + root.setExpanded(false); }); textfieldDirectoryPath = new TextField(); diff --git a/src/main/java/org/jabref/gui/fieldeditors/IdentifierEditor.java b/src/main/java/org/jabref/gui/fieldeditors/IdentifierEditor.java index cbc572f5216..2d2eb46be71 100644 --- a/src/main/java/org/jabref/gui/fieldeditors/IdentifierEditor.java +++ b/src/main/java/org/jabref/gui/fieldeditors/IdentifierEditor.java @@ -40,7 +40,7 @@ public IdentifierEditor(Field field, TaskExecutor taskExecutor, DialogService di textArea.textProperty().bindBidirectional(viewModel.textProperty()); fetchInformationByIdentifierButton.setTooltip( - new Tooltip(Localization.lang("Get BibTeX data from %0", field.getDisplayName()))); + new Tooltip(Localization.lang("Get bibliographic data from %0", field.getDisplayName()))); lookupIdentifierButton.setTooltip( new Tooltip(Localization.lang("Look up %0", field.getDisplayName()))); diff --git a/src/main/java/org/jabref/gui/groups/GroupDialog.fxml b/src/main/java/org/jabref/gui/groups/GroupDialog.fxml index 442ffd000c7..75053c2749b 100644 --- a/src/main/java/org/jabref/gui/groups/GroupDialog.fxml +++ b/src/main/java/org/jabref/gui/groups/GroupDialog.fxml @@ -71,7 +71,7 @@ + text="%Searching for a keyword"> @@ -107,8 +107,8 @@ - - + + @@ -117,13 +117,13 @@ - - + + + text="%Generate groups from keywords in the following field"/> @@ -154,7 +154,7 @@ + text="%Generate groups for author last names"/> diff --git a/src/main/java/org/jabref/gui/groups/GroupDialogViewModel.java b/src/main/java/org/jabref/gui/groups/GroupDialogViewModel.java index e7a183f1d27..17d0607efce 100644 --- a/src/main/java/org/jabref/gui/groups/GroupDialogViewModel.java +++ b/src/main/java/org/jabref/gui/groups/GroupDialogViewModel.java @@ -170,20 +170,20 @@ private void setupValidation() { } }, ValidationMessage.error(String.format("%s > %n %s %n %n %s", - Localization.lang("Searching for keywords"), + Localization.lang("Searching for a keyword"), Localization.lang("Keywords"), Localization.lang("Invalid regular expression.")))); keywordFieldEmptyValidator = new FunctionBasedValidator<>( keywordGroupSearchFieldProperty, StringUtil::isNotBlank, - ValidationMessage.error(Localization.lang("Please enter a field name to search for keywords."))); + ValidationMessage.error(Localization.lang("Please enter a field name to search for a keyword."))); keywordSearchTermEmptyValidator = new FunctionBasedValidator<>( keywordGroupSearchTermProperty, input -> !StringUtil.isNullOrEmpty(input), ValidationMessage.error(String.format("%s > %n %s %n %n %s", - Localization.lang("Searching for keywords"), + Localization.lang("Searching for a keyword"), Localization.lang("Keywords"), Localization.lang("Search term is empty.") ))); diff --git a/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java b/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java index d74fd516063..15b7baed8d2 100644 --- a/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java +++ b/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java @@ -76,7 +76,7 @@ protected List call() { dialog.showAndWait(); } }); - task.setOnFailed(event -> dialogService.showErrorDialogAndWait("Integrity check failed.")); + task.setOnFailed(event -> dialogService.showErrorDialogAndWait("Integrity check failed.", task.getException())); dialogService.showProgressDialog( Localization.lang("Checking integrity..."), diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index caf1f038e4b..167c12989f1 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -130,6 +130,7 @@ public static void setExactWidth(TableColumn column, double width) { private TableColumn createIndexColumn(MainTableColumnModel columnModel) { TableColumn column = new MainTableColumn<>(columnModel); Node header = new Text("#"); + header.getStyleClass().add("mainTable-header"); Tooltip.install(header, new Tooltip(MainTableColumnModel.Type.INDEX.getDisplayName())); column.setGraphic(header); column.setStyle("-fx-alignment: CENTER-RIGHT;"); diff --git a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java index 41adef02303..921ff24d050 100644 --- a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java @@ -48,6 +48,7 @@ import org.jabref.logic.openoffice.OpenOfficePreferences; import org.jabref.logic.openoffice.StyleLoader; import org.jabref.logic.openoffice.UndefinedParagraphFormatException; +import org.jabref.logic.util.OS; import org.jabref.logic.util.io.FileUtil; import org.jabref.model.database.BibDatabase; import org.jabref.model.database.BibDatabaseContext; @@ -430,9 +431,13 @@ private List findOpenOfficeJars(Path configurationPath) throws IOException throw new IOException("(Not all) required Open Office Jars were found inside installation path. Searched for " + OpenOfficePreferences.OO_JARS + " in " + configurationPath); } - List jarURLs = new ArrayList<>(OpenOfficePreferences.OO_JARS.size()); + List jarURLs = new ArrayList<>(OpenOfficePreferences.OO_JARS.size() + 1); for (Optional jarPath : filePaths) { jarURLs.add((jarPath.get().toUri().toURL())); + // For Mac OSX we need to add the "Contents/MacOS", because otherwise we cannot connect to LO + if (OS.OS_X) { + jarURLs.add(configurationPath.resolve("Contents/MacOS/").toUri().toURL()); + } } return jarURLs; } diff --git a/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml b/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml index f690cd1b8e4..e2f57285195 100644 --- a/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml +++ b/src/main/java/org/jabref/gui/preferences/AppearanceTab.fxml @@ -11,7 +11,9 @@ + + diff --git a/src/main/java/org/jabref/gui/preferences/CitationKeyPatternTab.fxml b/src/main/java/org/jabref/gui/preferences/CitationKeyPatternTab.fxml index f992dc19b62..c1f334e350a 100644 --- a/src/main/java/org/jabref/gui/preferences/CitationKeyPatternTab.fxml +++ b/src/main/java/org/jabref/gui/preferences/CitationKeyPatternTab.fxml @@ -10,6 +10,7 @@ + diff --git a/src/main/java/org/jabref/gui/preferences/ExternalTab.fxml b/src/main/java/org/jabref/gui/preferences/ExternalTab.fxml index d8ada3599ab..1951cb26a2c 100644 --- a/src/main/java/org/jabref/gui/preferences/ExternalTab.fxml +++ b/src/main/java/org/jabref/gui/preferences/ExternalTab.fxml @@ -11,7 +11,9 @@ + + diff --git a/src/main/java/org/jabref/gui/preferences/FileTab.fxml b/src/main/java/org/jabref/gui/preferences/FileTab.fxml index 6810b007208..0615129773b 100644 --- a/src/main/java/org/jabref/gui/preferences/FileTab.fxml +++ b/src/main/java/org/jabref/gui/preferences/FileTab.fxml @@ -9,7 +9,10 @@ + + +