Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-for-issue-10872
Browse files Browse the repository at this point in the history
* upstream/main: (26 commits)
  Speed up failure reporting (#11030)
  Importing of BibDesk Groups and Linked Files (#10968)
  Convert RemoveBracesFormatterTest to @ParameterizedTest (#11033)
  Update teaching.md
  Remove non-existing recipe (#11029)
  Update CSL styles (#11031)
  Clean up defintions of entry types (#11013)
  Fix log file path on Windows (#11028)
  Change to rolling logs (#11023)
  chore: remove repetitive words (#11015)
  Fix test names (#11014)
  Remove obsolete "Comments" tab configuration (#11011)
  Fix "Other fields" tab respecting custom tabs (#11012)
  [WIP] Extract PDF References (#10437)
  Fixed jump to entry from crossref (#11009)
  fix suggestion provider for crossref field (#10962)
  Use SequencedSet for required and optional fields (#11007)
  Bump io.github.classgraph:classgraph from 4.8.165 to 4.8.168 (#11005)
  Bump org.glassfish.hk2:hk2-api from 3.0.6 to 3.1.0 (#11006)
  Bump org.apache.logging.log4j:log4j-to-slf4j from 2.23.0 to 2.23.1 (#11003)
  ...

# Conflicts:
#	src/main/resources/csl-styles
  • Loading branch information
Siedlerchr committed Mar 17, 2024
2 parents 053b25e + 197f730 commit 2e88fe0
Show file tree
Hide file tree
Showing 79 changed files with 1,738 additions and 491 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deployment-arm64.yml
Expand Up @@ -66,12 +66,12 @@ jobs:
submodules: 'true'
show-progress: 'false'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.13.2
uses: gittools/actions/gitversion/setup@v0.13.4
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.13.2
uses: gittools/actions/gitversion/execute@v0.13.4
- name: Setup JDK
uses: actions/setup-java@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployment-jdk-ea.yml
Expand Up @@ -87,12 +87,12 @@ jobs:
packages: pigz
version: 1.0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.13.2
uses: gittools/actions/gitversion/setup@v0.13.4
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.13.2
uses: gittools/actions/gitversion/execute@v0.13.4
- name: 'Set up JDK ${{ matrix.jdk }}'
uses: oracle-actions/setup-java@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployment.yml
Expand Up @@ -79,12 +79,12 @@ jobs:
packages: pigz
version: 1.0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.13.2
uses: gittools/actions/gitversion/setup@v0.13.4
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.13.2
uses: gittools/actions/gitversion/execute@v0.13.4
- name: Setup JDK
uses: actions/setup-java@v4
with:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/tests.yml
Expand Up @@ -171,11 +171,15 @@ jobs:
run: xvfb-run --auto-servernum ./gradlew check -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer
env:
CI: "true"
- name: Prepare format failed test results
if: failure()
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: xml-twig-tools xsltproc
version: 1.0
- name: Format failed test results
if: failure()
run: |
sudo apt-get install -qq -y xml-twig-tools xsltproc
scripts/after-failure.sh
run: scripts/after-failure.sh
databasetests:
name: Database tests
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-release.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
cd build
wget -q -m -r -nH --cut-dirs 2 --no-parent --accept=tar.gz,dmg,pkg,deb,rpm,zip,msi https://builds.jabref.org/tags/
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
draft: true
files: build/**
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -24,10 +24,12 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- When pasting HTML into the abstract or a comment field, the hypertext is automatically converted to Markdown. [#10558](https://github.com/JabRef/jabref/issues/10558)
- We added the possibility to redownload files that had been present but are no longer in the specified location. [#10848](https://github.com/JabRef/jabref/issues/10848)
- We added the citation key pattern `[camelN]`. Equivalent to the first N words of the `[camel]` pattern.
- We added importing of static groups and linked files from BibDesk .bib files. [#10381](https://github.com/JabRef/jabref/issues/10381)
- We added ability to export in CFF (Citation File Format) [#10661](https://github.com/JabRef/jabref/issues/10661).
- We added ability to push entries to TeXworks. [#3197](https://github.com/JabRef/jabref/issues/3197)
- We added the ability to zoom in and out in the document viewer using <kbd>Ctrl</kbd> + <kbd>Scroll</kbd>. [#10964](https://github.com/JabRef/jabref/pull/10964)
- We added a Cleanup for removing non-existent files and grouped the related options [#10929](https://github.com/JabRef/jabref/issues/10929)
- We added the functionality to parse the bibliography of PDFs using the GROBID online service. [#10200](https://github.com/JabRef/jabref/issues/10200)

### Changed

Expand All @@ -41,6 +43,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We changed the duplicate handling in the Import entries dialog. Potential duplicate entries are marked with an icon and importing will now trigger the merge dialog [#10914](https://github.com/JabRef/jabref/pull/10914)
- We made the command "Push to TexShop" more robust to allow cite commands with a character before the first slash. [forum#2699](https://discourse.jabref.org/t/push-to-texshop-mac/2699/17?u=siedlerchr)
- We only show the notification "Saving library..." if the library contains more than 2000 entries. [#9803](https://github.com/JabRef/jabref/issues/9803)
- JabRef now keeps previous log files upon start. [#11023](https://github.com/JabRef/jabref/pull/11023)
- We enhanced the dialog for adding new fields in the content selector with a selection box containing a list of standard fields. [#10912](https://github.com/JabRef/jabref/pull/10912)
- We store the citation relations in an LRU cache to avoid bloating the memory and out-of-memory exceptions. [#10958](https://github.com/JabRef/jabref/issues/10958)
- Keywords filed are now displayed as tags. [#10910](https://github.com/JabRef/jabref/pull/10910)
Expand All @@ -53,6 +56,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We fixed an issue where the preview panel showing the wrong entry (an entry that is not selected in the entry table). [#9172](https://github.com/JabRef/jabref/issues/9172)
- We fixed an issue where HTML-reserved characters like '&' and '<', in addition to HTML entities like '&amp;' were not rendered correctly in entry preview. [#10677](https://github.com/JabRef/jabref/issues/10677)
- The last page of a PDF is now indexed by the full text search. [#10193](https://github.com/JabRef/jabref/issues/10193)
- The entry editor respects the configured custom tabs when showing "Other fields". [#11012](https://github.com/JabRef/jabref/pull/11012)
- The default owner of an entry can be changed again. [#10924](https://github.com/JabRef/jabref/issues/10924)
- We fixed an issue where the duplicate check did not take umlauts or other LaTeX-encoded characters into account. [#10744](https://github.com/JabRef/jabref/pull/10744)
- We fixed the colors of the icon on hover for unset special fields. [#10431](https://github.com/JabRef/jabref/issues/10431)
Expand All @@ -61,6 +65,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We fixed an issue where the `CommentsTab` was not properly formatted when the `defaultOwner` contained capital or special letters. [#10870](https://github.com/JabRef/jabref/issues/10870)
- We fixed an issue where the `File -> Close library` menu item was not disabled when no library was open. [#10948](https://github.com/JabRef/jabref/issues/10948)
- We fixed an issue where the Document Viewer would show the PDF in only half the window when maximized. [#10934](https://github.com/JabRef/jabref/issues/10934)
- Clicking on the crossref and related tags in the entry editor jumps to the linked entry. [#5484](https://github.com/JabRef/jabref/issues/5484) [#9369](https://github.com/JabRef/jabref/issues/9369)

### Removed

Expand Down
13 changes: 8 additions & 5 deletions build.gradle
Expand Up @@ -9,7 +9,7 @@ plugins {

id 'me.champeau.jmh' version '0.7.2'

id 'org.javamodularity.moduleplugin' version '1.8.14'
id 'org.javamodularity.moduleplugin' version '1.8.15'

id 'org.openjfx.javafxplugin' version '0.1.0'

Expand Down Expand Up @@ -196,14 +196,14 @@ dependencies {
// route all requests to java.util.logging to SLF4J (which in turn routes to tinylog)
implementation 'org.slf4j:jul-to-slf4j:2.0.9'
// route all requests to log4j to SLF4J
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.23.0'
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.23.1'

implementation('de.undercouch:citeproc-java:3.0.0-beta.2') {
exclude group: 'org.antlr'
}

// jakarta.activation is already dependency of glassfish
implementation group: 'jakarta.xml.bind', name: 'jakarta.xml.bind-api', version: '4.0.1'
implementation group: 'jakarta.xml.bind', name: 'jakarta.xml.bind-api', version: '4.0.2'
implementation group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '4.0.3'

implementation ('com.github.tomtung:latex2unicode_2.13:0.3.2') {
Expand All @@ -228,7 +228,7 @@ dependencies {
implementation 'org.glassfish.jersey.core:jersey-server:3.1.5'
// injection framework
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.5'
implementation 'org.glassfish.hk2:hk2-api:3.0.6'
implementation 'org.glassfish.hk2:hk2-api:3.1.0'
// testImplementation 'org.glassfish.hk2:hk2-testing:3.0.4'
// implementation 'org.glassfish.hk2:hk2-testing-jersey:3.0.4'
// testImplementation 'org.glassfish.hk2:hk2-junitrunner:3.0.4'
Expand All @@ -242,7 +242,10 @@ dependencies {
// Because of GraalVM quirks, we need to ship that. See https://github.com/jspecify/jspecify/issues/389#issuecomment-1661130973 for details
implementation 'org.jspecify:jspecify:0.3.0'

testImplementation 'io.github.classgraph:classgraph:4.8.165'
// parse plist files
implementation 'com.googlecode.plist:dd-plist:1.23'

testImplementation 'io.github.classgraph:classgraph:4.8.168'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.2'

Expand Down
2 changes: 1 addition & 1 deletion config/README.md
Expand Up @@ -20,7 +20,7 @@ Style-checks are done for each pull request and installing this code style confi
# Eclipse:

The Eclipse code formatter style is stored in the `eclipse.gradle` file and gets imported automatically.
In case the formatter style needs to be adapted, configure it and export in in eclipse.
In case the formatter style needs to be adapted, configure it and export in eclipse.

1. Right click on the eclipse project "JabRef"
2. Select "Export > General > Preferences"
Expand Down
9 changes: 8 additions & 1 deletion docs/code-howtos/custom-svg-icons.md
Expand Up @@ -23,7 +23,14 @@ Good icon design requires years of experience and cannot be covered here. Adapti

## Step 2. Packing the icons into a font

Use the [IcoMoon](https://icomoon.io) tool for packing the icons. Create a new set and import _all_ icons. Rearrange them so that they have the same order as in `org.jabref.gui.JabRefMaterialDesignIcon`. This will avoid that you have to change the code points for the existing glyphs. In the settings for your icon set, set the _Grid_ to 24. This is important to get the correct spacing. The name of the font is `JabRefMaterialDesign`. When your icon-set is ready, select all of them and download the font-package.
Use the [IcoMoon](https://icomoon.io) tool for packing the icons.

1. Create a new set by importing the json file
2. Next to the icons, click on the hamburger menu, chose "Import to Set" to add a new icon (it will be added to the front)
Rearrange them so that they have the same order as in `org.jabref.gui.JabRefMaterialDesignIcon`. This will avoid that you have to change the code points for the existing glyphs. In the settings for your icon set, set the _Grid_ to 24. This is important to get the correct spacing. The name of the font is `JabRefMaterialDesign`.
3. Next to the icons, click on the hamburger menu and click "Select all".
4. Proceed with the font creating, set the font property name to `JabRefMaterialDesign`
When your icon-set is ready, select all of them and download the font-package.

## Step 3. Replace the existing `JabRefMaterialDesign.ttf`

Expand Down
4 changes: 1 addition & 3 deletions docs/teaching.md
Expand Up @@ -83,8 +83,6 @@ Course: BSc Computer Science Individual Project
* Summary: Students experience the procedure of finding and fixing small and medium issues in an open source project.
* Successfully run in 2022/2023

Do you have additions/suggestions for improvement?

#### Northern Arizona University (NAU), USA

Course [CS499 - Open Source Software Development](https://github.com/igorsteinmacher/CS499-OSS)
Expand Down Expand Up @@ -129,7 +127,7 @@ Course "Programming and Software Development" as part of the [BSc Software Engin
Course [DD2480 Software Engineering Fundamentals](https://www.kth.se/student/kurser/kurs/DD2480?l=en)

* Summary: Groups of students from three to five persons experienced the whole software engineering process within a week: From the requirements' specification to the final pull request.
* Successfully run in 2020
* Successfully run in 2020, 2024, and other years.

### Portuguese

Expand Down
20 changes: 20 additions & 0 deletions licenses/com.googlecode.plist_ddplist.txt
@@ -0,0 +1,20 @@
dd-plist - An open source library to parse and generate property lists
Copyright (C) 2016 Daniel Dreibrodt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 0 additions & 2 deletions rewrite.yml
Expand Up @@ -103,8 +103,6 @@ recipeList:
- org.openrewrite.java.migrate.lang.StringFormatted
- org.openrewrite.java.migrate.util.SequencedCollection

- org.openrewrite.java.recipes.UseJavaParserBuilderInJavaTemplate

- org.openrewrite.java.RemoveObjectsIsNull
- org.openrewrite.java.ShortenFullyQualifiedTypeReferences

Expand Down
1 change: 1 addition & 0 deletions src/main/java/module-info.java
Expand Up @@ -144,4 +144,5 @@
requires org.libreoffice.uno;
requires de.saxsys.mvvmfx.validation;
requires com.jthemedetector;
requires dd.plist;
}
19 changes: 9 additions & 10 deletions src/main/java/org/jabref/Launcher.java
Expand Up @@ -11,15 +11,13 @@
import java.util.List;
import java.util.Map;

import org.jabref.architecture.AllowedToUseStandardStreams;
import org.jabref.cli.ArgumentProcessor;
import org.jabref.cli.JabRefCLI;
import org.jabref.gui.Globals;
import org.jabref.gui.JabRefGUI;
import org.jabref.logic.UiCommand;
import org.jabref.logic.journals.JournalAbbreviationLoader;
import org.jabref.logic.journals.predatory.PredatoryJournalListLoader;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.net.ProxyAuthenticator;
import org.jabref.logic.net.ProxyPreferences;
import org.jabref.logic.net.ProxyRegisterer;
Expand Down Expand Up @@ -48,7 +46,6 @@
* - Handle the command line arguments
* - Start the JavaFX application (if not in cli mode)
*/
@AllowedToUseStandardStreams("Direct output to the user")
public class Launcher {
private static Logger LOGGER;
private static boolean isDebugEnabled;
Expand Down Expand Up @@ -140,11 +137,14 @@ private static void addLogToDisk() {
// The "Shared File Writer" is explained at
// https://tinylog.org/v2/configuration/#shared-file-writer
Map<String, String> configuration = Map.of(
"writerFile", "shared file",
"writerFile.level", isDebugEnabled ? "debug" : "info",
"level", isDebugEnabled ? "debug" : "info",
"writerFile.file", directory.resolve("log.txt").toString(),
"writerFile.charset", "UTF-8");
"writerFile", "rolling file",
"writerFile.level", isDebugEnabled ? "debug" : "info",
// We need to manually join the path, because ".resolve" does not work on Windows, because ":" is not allowed in file names on Windows
"writerFile.file", directory + File.separator + "log_{date:yyyy-MM-dd_HH-mm-ss}.txt",
"writerFile.charset", "UTF-8",
"writerFile.policies", "startup",
"writerFile.backups", "30");

configuration.forEach(Configuration::set);
initializeLogger();
Expand All @@ -169,9 +169,8 @@ private static boolean handleMultipleAppInstances(String[] args, RemotePreferenc
LOGGER.debug("Passing arguments passed on to running JabRef...");
if (remoteClient.sendCommandLineArguments(args)) {
// So we assume it's all taken care of, and quit.
LOGGER.debug("Arguments passed on to running JabRef instance.");
// Used for script-use output etc. to the user
System.out.println(Localization.lang("Arguments passed on to running JabRef instance. Shutting down."));
// Output to both to the log and the screen. Therefore, we do not have an additional System.out.println.
LOGGER.info("Arguments passed on to running JabRef instance. Shutting down.");
return false;
} else {
LOGGER.warn("Could not communicate with other running JabRef instance.");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Expand Up @@ -574,9 +574,11 @@ public void init() {
EasyBind.subscribe(tabbedPane.getSelectionModel().selectedItemProperty(), selectedTab -> {
if (selectedTab instanceof LibraryTab libraryTab) {
stateManager.setActiveDatabase(libraryTab.getBibDatabaseContext());
stateManager.activeTabProperty().set(Optional.of(libraryTab));
} else if (selectedTab == null) {
// All databases are closed
stateManager.setActiveDatabase(null);
stateManager.activeTabProperty().set(Optional.empty());
}
});

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/jabref/gui/LibraryTab.java
Expand Up @@ -282,8 +282,9 @@ private void setDatabaseContext(BibDatabaseContext bibDatabaseContext) {
return;
}
if (tabPane.getSelectionModel().selectedItemProperty().get().equals(this)) {
LOGGER.debug("This case should not happen.");
LOGGER.warn("This case should not happen.");
stateManager.setActiveDatabase(bibDatabaseContext);
stateManager.activeTabProperty().set(Optional.of(this));
}

// Remove existing dummy BibDatabaseContext and add correct BibDatabaseContext from ParserResult to trigger changes in the openDatabases list in the stateManager
Expand Down Expand Up @@ -597,8 +598,8 @@ private void setupAutoCompletion() {
if (autoCompletePreferences.shouldAutoComplete()) {
suggestionProviders = new SuggestionProviders(getDatabase(), Globals.journalAbbreviationRepository, autoCompletePreferences);
} else {
// Create suggestion providers with database for crossref if auto-completion is deactivated
suggestionProviders = new SuggestionProviders(getDatabase());
// Create empty suggestion providers if auto-completion is deactivated
suggestionProviders = new SuggestionProviders();
}
searchAutoCompleter = new PersonNameSuggestionProvider(FieldFactory.getPersonNameFields(), getDatabase());
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/jabref/gui/StateManager.java
Expand Up @@ -54,6 +54,7 @@ public class StateManager {
private final CustomLocalDragboard localDragboard = new CustomLocalDragboard();
private final ObservableList<BibDatabaseContext> openDatabases = FXCollections.observableArrayList();
private final OptionalObjectProperty<BibDatabaseContext> activeDatabase = OptionalObjectProperty.empty();
private final OptionalObjectProperty<LibraryTab> activeTab = OptionalObjectProperty.empty();
private final ReadOnlyListWrapper<GroupTreeNode> activeGroups = new ReadOnlyListWrapper<>(FXCollections.observableArrayList());
private final ObservableList<BibEntry> selectedEntries = FXCollections.observableArrayList();
private final ObservableMap<BibDatabaseContext, ObservableList<GroupTreeNode>> selectedGroups = FXCollections.observableHashMap();
Expand Down Expand Up @@ -91,6 +92,10 @@ public OptionalObjectProperty<BibDatabaseContext> activeDatabaseProperty() {
return activeDatabase;
}

public OptionalObjectProperty<LibraryTab> activeTabProperty() {
return activeTab;
}

public OptionalObjectProperty<SearchQuery> activeSearchQueryProperty() {
return activeSearchQuery;
}
Expand Down

0 comments on commit 2e88fe0

Please sign in to comment.