Skip to content

Commit

Permalink
Merge branch 'main' into fix-for-issue-11512
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Aug 6, 2024
2 parents 64a4b85 + a28cfd2 commit 821617f
Show file tree
Hide file tree
Showing 69 changed files with 1,036 additions and 577 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deployment-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
create-keychain: false
keychain-password: jabref
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Prepare merged jars and modules dir (macOS)
Expand Down Expand Up @@ -141,6 +141,8 @@ jobs:
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections.transformation=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Build pkg (macOS)
if: (steps.checksecrets.outputs.secretspresent == 'YES')
Expand Down Expand Up @@ -179,6 +181,8 @@ jobs:
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections.transformation=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Rename files with arm64 suffix as well
if: (steps.checksecrets.outputs.secretspresent == 'YES')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deployment-jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
java-version: 21
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Prepare merged jars and modules dir
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Prepare merged jars and modules dir (macOS)
Expand Down Expand Up @@ -153,6 +153,8 @@ jobs:
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections.transformation=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Build pkg (macOS)
if: (matrix.os == 'macos-13') && (steps.checksecrets.outputs.secretspresent == 'YES')
Expand Down Expand Up @@ -192,6 +194,8 @@ jobs:
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections=org.jabref \
--java-options --add-opens=javafx.base/javafx.collections.transformation=org.jabref \
--java-options --add-modules=jdk.incubator.vector
- name: Build runtime image and installer (linux, Windows)
if: (matrix.os != 'macos-13') && (steps.checksecrets.outputs.secretspresent == 'YES')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-fetchers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Run fetcher tests
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
checkstyle_config: 'config/checkstyle/checkstyle_reviewdog.xml'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Run checkstyle using gradle
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Run OpenRewrite
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Run modernizer
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Run tests
Expand Down Expand Up @@ -280,7 +280,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Run tests on PostgreSQL
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Run GUI tests
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
java-version: 21.0.2
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Update test coverage metrics
Expand Down Expand Up @@ -400,7 +400,7 @@ jobs:
- uses: actions/checkout@v4
with:
show-progress: 'false'
- uses: gradle/actions/wrapper-validation@v3
- uses: gradle/actions/wrapper-validation@v4

# This ensures that no git merge conflict markers (<<<, ...) are contained
merge_conflict_job:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We added support for selecting and using CSL Styles in JabRef's OpenOffice/LibreOffice integration for inserting bibliographic and in-text citations into a document. [#2146](https://github.com/JabRef/jabref/issues/2146), [#8893](https://github.com/JabRef/jabref/issues/8893)
- We added Tools > New library based on references in PDF file... to create a new library based on the references section in a PDF file. [#11522](https://github.com/JabRef/jabref/pull/11522)
- When converting the references section of a paper (PDF file), more than the last page is treated. [#11522](https://github.com/JabRef/jabref/pull/11522)
- Added the functionality to invoke offline reference parsing explicitly. [#11565](https://github.com/JabRef/jabref/pull/11565)
- The dialog for [adding an entry using reference text](https://docs.jabref.org/collect/newentryfromplaintext) is now filled with the clipboard contents as default. [#11565](https://github.com/JabRef/jabref/pull/11565)
- Added minimal support for [biblatex data annotation](https://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf#subsection.3.7) fields in `.layout` files. [#11505](https://github.com/JabRef/jabref/issues/11505)
- Added saving of selected options in the [Lookup -> Search for unlinked local files dialog](https://docs.jabref.org/collect/findunlinkedfiles#link-the-pdfs-to-your-bib-library). [#11439](https://github.com/JabRef/jabref/issues/11439)
- We fixed black text in Dark mode inside "Citation information" [#11512](https://github.com/JabRef/jabref/issues/11512)
- We added a toggle button to invert the selected groups. [#9073](https://github.com/JabRef/jabref/issues/9073)
- We reintroduced the floating search in the main table. [#4237](https://github.com/JabRef/jabref/issues/4237)
- We fixed an issue where the selection of an entry in the table lost after searching for a group. [#3176](https://github.com/JabRef/jabref/issues/3176)

### Changed

Expand All @@ -25,11 +30,13 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- JabRef respects the [configuration for storing files relative to the .bib file](https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks#directories-for-files) in more cases. [#11492](https://github.com/JabRef/jabref/pull/11492)
- JabRef does not show finished background tasks in the status bar popup. [#11574](https://github.com/JabRef/jabref/pull/11574)
- We enhanced the indexing speed. [#11502](https://github.com/JabRef/jabref/pull/11502)
- ⚠️ Renamed command line parameters `embeddBibfileInPdf` to `embedBibFileInPdf`, `writeMetadatatoPdf` to `writeMetadataToPdf`, and `writeXMPtoPdf` to `writeXmpToPdf`. [#11575](https://github.com/JabRef/jabref/pull/11575)

### Fixed

- We fixed an issue where the "Check for updates" preference was not saved. [#11485](https://github.com/JabRef/jabref/pull/11485)
- We fixed an issue where an exception was thrown after changing "show preview as a tab" in the preferences. [#11515](https://github.com/JabRef/jabref/pull/11515)
- We fixed an issue that online and offline mode for new library creation were handled incorrectly. [#11565](https://github.com/JabRef/jabref/pull/11565)
- We fixed an issue with colors in the search bar when dark theme is enabled. [#11569](https://github.com/JabRef/jabref/issues/11569)
- We fixed an issue where a new unsaved library was not marked with an asterisk. [#11519](https://github.com/JabRef/jabref/pull/11519)
- We fixed an issue where JabRef starts without window decorations. [#11440](https://github.com/JabRef/jabref/pull/11440)
Expand Down
20 changes: 13 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ plugins {

id 'idea'

id 'org.openrewrite.rewrite' version '6.16.4'
id 'org.openrewrite.rewrite' version '6.17.1'
}

// Enable following for debugging
Expand Down Expand Up @@ -89,7 +89,10 @@ application {
'--add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref',
'--add-opens=javafx.graphics/javafx.scene=org.jabref',
'--add-opens=javafx.controls/javafx.scene.control=org.jabref',
'--add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref'
'--add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref',

'--add-opens=javafx.base/javafx.collections=org.jabref',
'--add-opens=javafx.base/javafx.collections.transformation=org.jabref'
]
}

Expand Down Expand Up @@ -184,7 +187,7 @@ dependencies {
implementation 'com.github.javakeyring:java-keyring:1.0.4'

antlr4 'org.antlr:antlr4:4.13.1'
implementation 'org.antlr:antlr4-runtime:4.13.1'
implementation 'org.antlr:antlr4-runtime:4.13.2'

implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '6.10.0.202406032230-r'

Expand Down Expand Up @@ -291,8 +294,8 @@ dependencies {
// testImplementation 'org.glassfish.hk2:hk2-junitrunner:3.0.4'
// HTTP server
// implementation 'org.glassfish.jersey.containers:jersey-container-netty-http:3.1.1'
implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.7'
testImplementation 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.7'
implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.8'
testImplementation 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.8'
// Allow objects "magically" to be mapped to JSON using GSON
// implementation 'org.glassfish.jersey.media:jersey-media-json-gson:3.1.1'

Expand Down Expand Up @@ -328,7 +331,7 @@ dependencies {
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '3.0.2'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '3.0.2'

rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.15.0"))
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.16.0"))
rewrite("org.openrewrite.recipe:rewrite-static-analysis")
rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")
Expand Down Expand Up @@ -495,7 +498,10 @@ run {
'org.controlsfx.controls/org.controlsfx.control.textfield' : 'org.jabref',

'javafx.controls/javafx.scene.control.skin' : 'org.controlsfx.controls',
'javafx.graphics/javafx.scene' : 'org.controlsfx.controls'
'javafx.graphics/javafx.scene' : 'org.controlsfx.controls',

'javafx.base/javafx.collections' : 'org.jabref',
'javafx.base/javafx.collections.transformation' : 'org.jabref'
]

addModules = [
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/jabref/cli/ArgumentProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,22 +239,22 @@ public void processArguments() {
automaticallySetFileLinks(loaded);
}

if ((cli.isWriteXMPtoPdf() && cli.isEmbeddBibfileInPdf()) || (cli.isWriteMetadatatoPdf() && (cli.isWriteXMPtoPdf() || cli.isEmbeddBibfileInPdf()))) {
System.err.println("Give only one of [writeXMPtoPdf, embeddBibfileInPdf, writeMetadatatoPdf]");
if ((cli.isWriteXmpToPdf() && cli.isEmbedBibFileInPdf()) || (cli.isWriteMetadataToPdf() && (cli.isWriteXmpToPdf() || cli.isEmbedBibFileInPdf()))) {
System.err.println("Give only one of [writeXmpToPdf, embedBibFileInPdf, writeMetadataToPdf]");
}

if (cli.isWriteMetadatatoPdf() || cli.isWriteXMPtoPdf() || cli.isEmbeddBibfileInPdf()) {
if (cli.isWriteMetadataToPdf() || cli.isWriteXmpToPdf() || cli.isEmbedBibFileInPdf()) {
if (!loaded.isEmpty()) {
writeMetadataToPdf(loaded,
cli.getWriteMetadatatoPdf(),
cli.getWriteMetadataToPdf(),
preferencesService.getXmpPreferences(),
preferencesService.getFilePreferences(),
preferencesService.getLibraryPreferences().getDefaultBibDatabaseMode(),
Injector.instantiateModelOrService(BibEntryTypesManager.class),
preferencesService.getFieldPreferences(),
Injector.instantiateModelOrService(JournalAbbreviationRepository.class),
cli.isWriteXMPtoPdf() || cli.isWriteMetadatatoPdf(),
cli.isEmbeddBibfileInPdf() || cli.isWriteMetadatatoPdf());
cli.isWriteXmpToPdf() || cli.isWriteMetadataToPdf(),
cli.isEmbedBibFileInPdf() || cli.isWriteMetadataToPdf());
}
}

Expand Down Expand Up @@ -379,7 +379,7 @@ private void writeMetadataToPDFsOfEntry(BibDatabaseContext databaseContext,
if (embeddedBibFilePdfExporter.exportToAllFilesOfEntry(databaseContext, filePreferences, entry, List.of(entry), abbreviationRepository)) {
System.out.printf("Successfully embedded metadata on at least one linked file of %s%n", citeKey);
} else {
System.out.printf("Cannot embedd metadata on any linked files of %s. Make sure there is at least one linked file and the path is correct.%n", citeKey);
System.out.printf("Cannot embed metadata on any linked files of %s. Make sure there is at least one linked file and the path is correct.%n", citeKey);
}
}
} catch (Exception e) {
Expand Down
29 changes: 14 additions & 15 deletions src/main/java/org/jabref/cli/JabRefCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class JabRefCLI {

public JabRefCLI(String[] args) throws ParseException {
Options options = getOptions();

this.cl = new DefaultParser().parse(options, args, true);
this.leftOver = cl.getArgList();
}
Expand Down Expand Up @@ -153,21 +152,21 @@ public boolean isAutomaticallySetFileLinks() {
return cl.hasOption("automaticallySetFileLinks");
}

public boolean isWriteXMPtoPdf() {
return cl.hasOption("writeXMPtoPdf");
public boolean isWriteXmpToPdf() {
return cl.hasOption("writeXmpToPdf");
}

public boolean isEmbeddBibfileInPdf() {
return cl.hasOption("embeddBibfileInPdf");
public boolean isEmbedBibFileInPdf() {
return cl.hasOption("embedBibFileInPdf");
}

public boolean isWriteMetadatatoPdf() {
return cl.hasOption("writeMetadatatoPdf");
public boolean isWriteMetadataToPdf() {
return cl.hasOption("writeMetadataToPdf");
}

public String getWriteMetadatatoPdf() {
return cl.hasOption("writeMetadatatoPdf") ? cl.getOptionValue("writeMetadatatoPdf") :
cl.hasOption("writeXMPtoPdf") ? cl.getOptionValue("writeXMPtoPdf") :
public String getWriteMetadataToPdf() {
return cl.hasOption("writeMetadatatoPdf") ? cl.getOptionValue("writeMetadataToPdf") :
cl.hasOption("writeXMPtoPdf") ? cl.getOptionValue("writeXmpToPdf") :
cl.hasOption("embeddBibfileInPdf") ? cl.getOptionValue("embeddBibfileInPdf") : null;
}

Expand Down Expand Up @@ -273,24 +272,24 @@ private static Options getOptions() {

options.addOption(Option
.builder()
.longOpt("writeXMPtoPdf")
.desc("%s: '%s'".formatted(Localization.lang("Write BibTeXEntry as XMP metadata to PDF."), "-w pathToMyOwnPaper.pdf"))
.longOpt("writeXmpToPdf")
.desc("%s: '%s'".formatted(Localization.lang("Write BibTeX as XMP metadata to PDF."), "-w pathToMyOwnPaper.pdf"))
.hasArg()
.argName("CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all")
.build());

options.addOption(Option
.builder()
.longOpt("embeddBibfileInPdf")
.longOpt("embedBibFileInPdf")
.desc("%s: '%s'".formatted(Localization.lang("Embed BibTeX as attached file in PDF."), "-w pathToMyOwnPaper.pdf"))
.hasArg()
.argName("CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all")
.build());

options.addOption(Option
.builder("w")
.longOpt("writeMetadatatoPdf")
.desc("%s: '%s'".formatted(Localization.lang("Write BibTeXEntry as metadata to PDF."), "-w pathToMyOwnPaper.pdf"))
.longOpt("writeMetadataToPdf")
.desc("%s: '%s'".formatted(Localization.lang("Write BibTeX to PDF (XMP and embedded)"), "-w pathToMyOwnPaper.pdf"))
.hasArg()
.argName("CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all")
.build());
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,22 @@ TextFlow > .tooltip-text-monospaced {
-fx-padding: 0 .5 0 .5;
}

.table-row-cell:matching-search-and-groups {
-fx-background-color: white;
}

.table-row-cell:matching-search-not-groups {
-fx-background-color: rgba(180, 180, 180, 0.86);
}

.table-row-cell:matching-groups-not-search {
-fx-background-color: rgba(140, 140, 140, 0.86);
}

.table-row-cell:not-matching-search-and-groups {
-fx-opacity: 60%;
}

.table-row-cell:hover,
.tree-table-row-cell:hover {
-fx-background-color: -jr-hover;
Expand Down
Loading

0 comments on commit 821617f

Please sign in to comment.