Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fix-967
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/org/jabref/gui/maintable/MainTable.java
#	src/main/java/org/jabref/gui/preferences/table/TableTabViewModel.java
  • Loading branch information
calixtus committed Feb 6, 2021
2 parents 513c68c + 93ad499 commit 286e7f9
Show file tree
Hide file tree
Showing 259 changed files with 4,987 additions and 2,988 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
id: waitforstatuschecks
uses: "WyriHaximus/github-action-wait-for-status@v1.3"
with:
ignoreActions: Automerge Dependabot
ignoreActions: Automerge Dependabot,codecov/project
checkInterval: 13
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,40 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We added some symbols and keybindings to the context menu in the entry editor. [#7268](https://github.com/JabRef/jabref/pull/7268)
- We added keybindings for setting and clearing the read status. [#7264](https://github.com/JabRef/jabref/issues/7264)
- We added two new fields to track the creation and most recent modification date and time for each entry. [koppor#130](https://github.com/koppor/jabref/issues/130)
- We added a feature that allows the user to copy highlighted text in the preview window. [#6962](https://github.com/JabRef/jabref/issues/6962)

### Changed

- We changed the resize behavior of table columns to have smart fit into the table if there is enough space. [#967](https://github.com/JabRef/jabref/issues/967)
- We improved the "Find unlinked files" dialog to show import results for each file. [#7209](https://github.com/JabRef/jabref/pull/7209)
- The content of the field `timestamp` is migrated to `creationdate`. In case one configured "udpate timestampe", it is migrated to `modificationdate`. [koppor#130](https://github.com/koppor/jabref/issues/130)
- The JabRef specific meta-data content in the main field such as priorities (prio1, prio2, ...) are migrated to their respective fields. They are removed from the keywords. [#6840](https://github.com/jabref/jabref/issues/6840)
- We fixed an issue where groups generated from authors' last names did not include all entries of the authors' [#5833](https://github.com/JabRef/jabref/issues/5833)
- The export to MS Office XML now uses the month name for the field `MonthAcessed` instead of the two digit number [#7354](https://github.com/JabRef/jabref/issues/7354)
- We included some standalone dialogs from the options menu in the main preference dialog and fixed some visual issues in the preferences dialog. [#7384](https://github.com/JabRef/jabref/pull/7384)

### Fixed

- We fixed an issue where the "Normalize page numbers" formatter did not replace en-dashes or em-dashes with a hyphen-minus sign. [#7239](https://github.com/JabRef/jabref/issues/7239)
- We fixed an issue with the style of highlighted check boxes while searching in preferences. [#7226](https://github.com/JabRef/jabref/issues/7226)
- We fixed an issue where the option "Move file to file directory" was disabled in the entry editor for all files [#7194](https://github.com/JabRef/jabref/issues/7194)
- We fixed an issue where application dialogs were opening in the wrong display when using multiple screens [#7273](https://github.com/JabRef/jabref/pull/7273)
- We fixed an issue where the "Find unlinked files" dialog would freeze JabRef on importing. [#7205](https://github.com/JabRef/jabref/issues/7205)
- We fixed an issue where the "Find unlinked files" would stop importing when importing a single file failed. [#7206](https://github.com/JabRef/jabref/issues/7206)
- We fixed an issue where an exception would be displayed for previewing and preferences when a custom theme has been configured but is missing [#7177](https://github.com/JabRef/jabref/issues/7177)
- We fixed an issue where URLs in `file` fields could not be handled on Windows. [#7359](https://github.com/JabRef/jabref/issues/7359)
- We fixed an issue where the regex based file search miss-interpreted specific symbols. [#4342](https://github.com/JabRef/jabref/issues/4342)
- We fixed an issue where the Harvard RTF exporter used the wrong default file extension. [4508](https://github.com/JabRef/jabref/issues/4508)
- We fixed an issue where the Harvard RTF exporter did not use the new authors formatter and therefore did not export "organization" authors correctly. [4508](https://github.com/JabRef/jabref/issues/4508)
- We fixed an issue where the field `urldate` was not exported to the corresponding fields `YearAccessed`, `MonthAccessed`, `DayAccessed` in MS Office XML [#7354](https://github.com/JabRef/jabref/issues/7354)
- We fixed an issue where the password for a shared SQL database was only remembered if it was the same as the username [#6869](https://github.com/JabRef/jabref/issues/6869)
- We fixed an issue where some custom exports did not use the new authors formatter and therefore did not export authors correctly [#7356](https://github.com/JabRef/jabref/issues/7356)
- We fixed an issue where alt+keyboard shortcuts do not work [#6994](https://github.com/JabRef/jabref/issues/6994)
- We fixed an issue where the file path is invisible in dark theme. [#7382](https://github.com/JabRef/jabref/issues/7382)
- We fixed an issue where the secondary sorting is not working for some special fields. [#7015](https://github.com/JabRef/jabref/issues/7015)
- We fixed an issue where changing the font size makes the font size field too small. [#7085](https://github.com/JabRef/jabref/issues/7085)
- We fixed an issue with TexGroups on Linux systems, where the modification of an aux-file did not trigger an auto-update for TexGroups. Furthermore, the detection of file modifications is now more reliable. [#7412](https://github.com/JabRef/jabref/pull/7412)
- We fixed an issue where the Unicode to Latex formatter produced wrong results for characters with a codepoint higher than Character.MAX_VALUE. [#7387](https://github.com/JabRef/jabref/issues/7387)

### Removed

Expand Down
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
id 'com.github.ben-manes.versions' version '0.36.0'
id 'org.javamodularity.moduleplugin' version '1.7.0'
id 'org.openjfx.javafxplugin' version '0.0.9'
id 'org.beryx.jlink' version '2.23.2'
id 'org.beryx.jlink' version '2.23.3'
// nicer test outputs during running and completion
// Homepage: https://github.com/radarsh/gradle-test-logger-plugin
id 'com.adarshr.test-logger' version '2.1.1'
Expand Down Expand Up @@ -42,6 +42,7 @@ java {

application {
mainClassName = "org.jabref.gui.JabRefLauncher"
mainModule = 'org.jabref'
}

// TODO: Ugly workaround to temporarily ignore build errors to dependencies of latex2unicode
Expand Down Expand Up @@ -132,7 +133,10 @@ dependencies {

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

implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.1'
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.12.0-rc2'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.12.0-rc2'

implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.2'

implementation 'org.postgresql:postgresql:42.2.18'

Expand Down Expand Up @@ -190,7 +194,7 @@ dependencies {
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.62.2'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.62.2'

testImplementation 'io.github.classgraph:classgraph:4.8.98'
testImplementation 'io.github.classgraph:classgraph:4.8.102'
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.0'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.7.0'
testImplementation 'org.junit.platform:junit-platform-launcher:1.7.0'
Expand All @@ -201,13 +205,13 @@ dependencies {
testImplementation 'org.mockito:mockito-core:3.7.7'
testImplementation 'org.xmlunit:xmlunit-core:2.8.2'
testImplementation 'org.xmlunit:xmlunit-matchers:2.8.2'
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.15.0'
testImplementation 'com.tngtech.archunit:archunit-junit5-api:0.15.0'
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.16.0'
testImplementation 'com.tngtech.archunit:archunit-junit5-api:0.16.0'
testImplementation "org.testfx:testfx-core:4.0.17-alpha-SNAPSHOT"
testImplementation "org.testfx:testfx-junit5:4.0.17-alpha-SNAPSHOT"
testImplementation "org.hamcrest:hamcrest-library:2.2"

checkstyle 'com.puppycrawl.tools:checkstyle:8.39'
checkstyle 'com.puppycrawl.tools:checkstyle:8.40'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.3'
}

Expand Down
2 changes: 2 additions & 0 deletions config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

<suppressions>
<suppress checks="[a-zA-Z0-9]*" files="[\\/]generated[\\/]" />
<!-- We ignore this file because it's a modification of the original java code https://github.com/openjdk/jfx/blob/jfx15/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TitledPaneSkin.java -->
<suppress checks="[a-zA-Z0-9]*" files="CustomTitledPaneSkin.java" />
</suppressions>
56 changes: 56 additions & 0 deletions docs/adr/0018-use-Jackson-to-parse-study-yml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Use Jackson to parse study.yml

## Context and Problem Statement

The study definition file is formulated as a YAML document.
To accessed the definition within JabRef this document has to be parsed.
What parser should be used to parse YAML files?

## Considered Options

* [Jackson](https://github.com/FasterXML/jackson-dataformat-yaml)
* [SnakeYAML Engine](https://bitbucket.org/asomov/snakeyaml)
* [yamlbeans](https://github.com/EsotericSoftware/yamlbeans)
* [eo-yaml](https://github.com/decorators-squad/eo-yaml)
* Self-written parser

## Decision Outcome

Chosen option: Jackson, because as it is a dedicated library for parsing YAML. yamlbeans also seem to be viable. They all offer similar functionality

## Pros and Cons of the Options

### Jackson

* Good, because established YAML parser library
* Good, because supports YAML 1.2
* Good, because it can parse LocalDate

### SnakeYAML Engine

* Good, because established YAML parser library
* Good, because supports YAML 1.2
* Bad, because cannot parse YAML into Java DTOs, only into [basic Java structures](https://bitbucket.org/asomov/snakeyaml-engine/src/master/), this then has to be assembled into DTOs

### yamlbeans

* Good, because established YAML parser library
* Good, because [nice getting started page](https://github.com/EsotericSoftware/yamlbeans)
* Bad, because objects need to be annotated in the yaml file to be parsed into Java objects

### eo-yaml

* Good, because established YAML parser library
* Good, because supports YAML 1.2
* Bad, because cannot parse YAML into Java DTOs

### Own parser

* Good, because easily customizable
* Bad, because high effort
* Bad, because has to be tested extensively

## Links

* [Winery's ADR-0009](https://github.com/eclipse/winery/blob/master/docs/adr/0009-manual-tosca-yaml-serialisation.md)
* [Winery's ADR-0010](https://github.com/eclipse/winery/blob/master/docs/adr/0010-tosca-yaml-deserialisation-using-snakeyaml.md)
30 changes: 30 additions & 0 deletions docs/adr/0019-keep-study-as-a-dto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Keep study as a DTO

## Context and Problem Statement

The study holds query and library entries that could be replaced respectively with complex query and fetcher instances.
This poses the question: should the study remain a pure DTO object or should it contain direct object instances?

## Considered Options

* Keep study as DTO and use transformers
* Replace entries with instances

## Decision Outcome

Chosen option: "Keep study as DTO and use transformators", because comes out best (see below).

## Pros and Cons of the Options

### Keep study as DTO and use transformators

* Good, because no need for custom serialization
* Good, because deactivated fetchers can be documented (important for traceable Searching (SLRs))
* Bad, because Entries for databases and queries needed

### Replace entries with instances

* Good, because no need for database and query entries
* Bad, because custom de-/serializers for fetchers and complex queries needed
* Bad, because harder to maintain than using "vanilla" jackson de-/serialization
*<!-- numbers of pros and cons can vary -->
4 changes: 2 additions & 2 deletions docs/getting-into-the-code/code-howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 different 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
Expand Down Expand Up @@ -190,7 +190,7 @@ If the language is a variant of a language `zh_CN` or `pt_BR` it is necessary to

## Cleanup and Formatters

We try to build a cleanup mechanism based on formatters. The idea is that we can register these actions in arbitrary places, e.g., onSave, onImport, onExport, cleanup, etc. and apply them to different fields. The formatters themself are independent of any logic and therefore easy to test.
We try to build a cleanup mechanism based on formatters. The idea is that we can register these actions in arbitrary places, e.g., onSave, onImport, onExport, cleanup, etc. and apply them to different fields. The formatters themselves are independent of any logic and therefore easy to test.

Example: [NormalizePagesFormatter](https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/logic/formatter/bibtexfields/NormalizePagesFormatter.java)

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,7 @@
requires lucene.queryparser;
requires lucene.core;
requires org.eclipse.jgit;
requires com.fasterxml.jackson.databind;
requires com.fasterxml.jackson.dataformat.yaml;
requires com.fasterxml.jackson.datatype.jsr310;
}
35 changes: 34 additions & 1 deletion src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
-fx-background-color: -jr-warn;
}

.file-row-text{
-fx-fill: -jr-search-text;
}

.combo-box-base {
-fx-background-color: -fx-outer-border, -fx-control-inner-background;
-fx-background-insets: 0, 1;
Expand Down Expand Up @@ -690,6 +694,31 @@
-fx-padding: 0;
}

.accordion .titled-pane {
-fx-skin: "org.jabref.gui.util.CustomTitledPaneSkin";
-fx-arrow-side: right;
}

.accordion .titled-pane .title {
-fx-background-color: transparent;
-fx-border-color: transparent;
-fx-background-insets: 5 5 5 5;
}

.accordion .titled-pane > *.content {
-fx-background-color: transparent;
-fx-border-color: transparent;
}

/*
* The arrow button has some right padding that's added
* by "modena.css". This simply puts the padding on the
* left since the arrow is positioned on the right.
*/
.titled-pane > .title > .arrow-button {
-fx-padding: 0.0em 0.0em 0.0em 0.583em;
}

.text-input {
-fx-background-color: -fx-outer-border, -fx-control-inner-background;
-fx-background-insets: 0, 1;
Expand Down Expand Up @@ -1192,6 +1221,10 @@ TextFlow * {

}

.mainTable-header{
.mainTable-header {
-fx-fill: -fx-mid-text-color;
}

.fontsizeSpinner{
-fx-pref-width: 5em;
}
Loading

0 comments on commit 286e7f9

Please sign in to comment.