Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fixdragandrop
Browse files Browse the repository at this point in the history
* upstream/master: (47 commits)
  Make attached files relative to the file directory (#4212)
  execute set visible in swing thread to avoid blocking
  Fix isbn chimbori test (#4234)
  Rewrite web search pane in JavaFX (#4203)
  Update dependencies (#4231)
  Update to latest release of richtextfx (#4213)
  Fix fetcher tests (#4216)
  single line text fields (#4138)
  Make it easier to rename and move files (#4200)
  Fix that swing dialogs are hidden behind main window (#4205)
  Fixed: #4166 add move & rename file (#4217)
  update gradle plugins and gradlen to 4.9
  Update dependencies
  Remove unnecessary look and feel migration (#4204)
  Revert threading fix since this sometimes lead to freezes...
  Update year
  Fix a few more threading exceptions
  Refactor
  Convert CiteSeerX fetcher to new infrastructure (#4185)
  Make global font size customizable (#4178)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/BasePanel.java
#	src/main/java/org/jabref/gui/JabRefFrame.java
#	src/main/java/org/jabref/gui/mergeentries/MergeEntries.java
#	src/main/resources/l10n/JabRef_en.properties
  • Loading branch information
Siedlerchr committed Jul 26, 2018
2 parents 07272ac + 077fdac commit 1d4db3d
Show file tree
Hide file tree
Showing 208 changed files with 3,641 additions and 5,275 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
## [Unreleased]

### Changed
- We added a "Move file to file directory and rename file" option for simultaneously moving and renaming of document file. [#4166](https://github.com/JabRef/jabref/issues/4166)
- Use integrated graphics card instead of discrete on macOS [#4070](https://github.com/JabRef/jabref/issues/4070)
- We changed the minimum required version of Java to 1.8.0_171, as this is the latest release for which the automatic Java update works. [4093](https://github.com/JabRef/jabref/issues/4093)
- The special fields like `Printed` and `Read status` now show gray icons when the row is hovered.
Expand All @@ -24,6 +25,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We changed the default keyboard shortcuts for moving between entries when the entry editor is active to ̀<kbd>alt</kbd> + <kbd>up/down</kbd>.
- Opening a new file now prompts the directory of the currently selected file, instead of the directory of the last opened file.
- Window state is saved on close and restored on start.
- Files without a defined external file type are now directly opened with the default aplication of the operating system
- We streamlined the process to rename and move files by removing the confirmation dialogs.



Expand All @@ -41,10 +44,12 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where in rare cases entries where overlayed in the main table. https://github.com/JabRef/jabref/issues/3281
- We fixed an issue where selecting a group messed up the focus of the main table / entry editor. https://github.com/JabRef/jabref/issues/3367
- We fixed an issue where composite author names were sorted incorrectly. https://github.com/JabRef/jabref/issues/2828
- We fixed an issue where commands followed by `-` didn't work. [#3805](https://github.com/JabRef/jabref/issues/3805)
- We fixed an issue where some journal names were wrongly marked as abbreviated. [#4115](https://github.com/JabRef/jabref/issues/4115)
- We fixed an issue where the custom file column were sorted incorrectly. https://github.com/JabRef/jabref/issues/3119
- We fixed an issues where the entry losses focus when a field is edited and at the same time used for sorting. https://github.com/JabRef/jabref/issues/3373
- We fixed an issue where the menu on Mac OS was not displayed in the usual Mac-specific way. https://github.com/JabRef/jabref/issues/3146
- We fixed an issue where the order of fields in customized entry types was not saved correctly. [#4033](http://github.com/JabRef/jabref/issues/4033)
- We fixed an issue where the groups tree of the last database was still shown even after the database was already closed.
- We fixed an issue where the "Open file dialog" may disappear behind other windows. https://github.com/JabRef/jabref/issues/3410
- We fixed an issue where the default icon of a group was not colored correctly.
Expand All @@ -55,7 +60,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the "Convert to BibTeX-Cleanup" moved the content of the `file` field to the `pdf` field [#4120](https://github.com/JabRef/jabref/issues/4120)
- We fixed an issue where the preview pane in entry preview in preferences wasn't showing the citation style selected [#3849](https://github.com/JabRef/jabref/issues/3849)
- We fixed an issue where the default entry preview style still contained the field `review`. The field `review` in the style is now replaced with comment to be consistent with the entry editor [#4098](https://github.com/JabRef/jabref/issues/4098)

- We fixed an issue where filles added via the "Attach file" contextmenu of an entry were not made relative. [#4201](https://github.com/JabRef/jabref/issues/4201)



Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Understanding the basics
We welcome contributions to JabRef and encourage to create a fork, clone, **create a new branch** (such as `fix-for-issue-121`), **work on the new branch — not master**, and create a pull request.
Be sure to create a **separate branch** for each improvement you implement.
Take a look at GitHub's excellent [help documentation] for a detailed explanation and the explanation of [Feature Branch Workflow](https://de.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development.
Take a look at GitHub's excellent overview on the [GitHub flow](https://guides.github.com/introduction/flow/index.html) and their [pull request help documentation](https://help.github.com/articles/about-pull-requests/) for a detailed explanation and the explanation of [Feature Branch Workflow](https://de.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development.

We also have [code howtos](https://github.com/JabRef/jabref/wiki/Code-Howtos) and [guidelines for setting up a local workspace](https://github.com/JabRef/jabref/wiki/Guidelines-for-setting-up-a-local-workspace).

Expand Down Expand Up @@ -118,5 +118,4 @@ You can add the prefix `[WIP]` to indicate that the pull request is not yet comp


[commit guidelines section of Pro Git]: http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines
[good commit message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[help documentation]: https://help.github.com/articles/about-pull-requests/
[good commit message]: https://github.com/joelparkerhenderson/git_commit_message
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright © 2003-2016 [JabRef Authors](https://github.com/JabRef/jabref/blob/master/AUTHORS)
Copyright © 2003-2018 [JabRef Authors](https://github.com/JabRef/jabref/blob/master/AUTHORS)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
74 changes: 39 additions & 35 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ buildscript {
}

plugins {
id 'com.gradle.build-scan' version '1.11'
id 'com.install4j.gradle' version '7.0.4'
id 'com.github.johnrengelman.shadow' version '2.0.2'
id 'com.gradle.build-scan' version '1.15.1'
id 'com.install4j.gradle' version '7.0.6'
id 'com.github.johnrengelman.shadow' version '2.0.4'
id "de.sebastianboegl.shadow.transformer.log4j" version "2.1.1"
id "com.simonharrer.modernizer" version '1.6.0-1'
id 'me.champeau.gradle.jmh' version '0.4.3'
id 'net.ltgt.errorprone' version '0.0.13'
id 'com.github.ben-manes.versions' version '0.17.0'
id 'me.champeau.gradle.jmh' version '0.4.7'
id 'net.ltgt.errorprone' version '0.0.15'
id 'com.github.ben-manes.versions' version '0.20.0'
}

// use the gradle build scan feature: https://scans.gradle.com/get-started
Expand All @@ -44,8 +44,8 @@ apply from: 'localization.gradle'
apply from: 'xjc.gradle'

group = "org.jabref"
version = "4.4-dev"
project.ext.threeDotVersion = "4.3.0.1"
version = "5.0-dev"
project.ext.threeDotVersion = "5.0.0.0"
project.ext.install4jDir = hasProperty("install4jDir") ? getProperty("install4jDir") : (OperatingSystem.current().isWindows() ? 'C:/Program Files/install4j7' : 'install4j7')
sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down Expand Up @@ -87,12 +87,12 @@ dependencies {
compile 'com.jgoodies:jgoodies-common:1.8.1'
compile 'com.jgoodies:jgoodies-forms:1.9.0'

compile 'org.apache.pdfbox:pdfbox:2.0.9'
compile 'org.apache.pdfbox:fontbox:2.0.9'
compile 'org.apache.pdfbox:xmpbox:2.0.9'
compile 'org.apache.pdfbox:pdfbox:2.0.11'
compile 'org.apache.pdfbox:fontbox:2.0.11'
compile 'org.apache.pdfbox:xmpbox:2.0.11'

// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635
compile 'org.bouncycastle:bcprov-jdk15on:1.59'
compile 'org.bouncycastle:bcprov-jdk15on:1.60'

compile 'commons-cli:commons-cli:1.4'

Expand All @@ -101,7 +101,7 @@ dependencies {
compile "org.libreoffice:ridl:5.4.2"
compile "org.libreoffice:unoil:5.4.2"

compile 'com.github.bkromhout:java-diff-utils:2.1.1'
compile 'io.github.java-diff-utils:java-diff-utils:2.2.0'
compile 'info.debatty:java-string-similarity:1.1.0'

antlr3 'org.antlr:antlr:3.5.2'
Expand All @@ -113,7 +113,7 @@ dependencies {
// VersionEye states that 6.0.5 is the most recent version, but http://dev.mysql.com/downloads/connector/j/ shows that as "Development Release"
compile 'mysql:mysql-connector-java:5.1.46'

compile 'org.postgresql:postgresql:42.2.2'
compile 'org.postgresql:postgresql:42.2.4'

compile 'net.java.dev.glazedlists:glazedlists_java15:1.9.1'

Expand All @@ -125,7 +125,7 @@ dependencies {
compile 'de.saxsys:mvvmfx:1.7.0'
compile 'org.fxmisc.easybind:easybind:1.0.3'
compile 'org.fxmisc.flowless:flowless:0.6.1'
compile 'org.fxmisc.richtext:richtextfx:0.9.0'
compile 'org.fxmisc.richtext:richtextfx:0.9.1'
compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
compile 'javax.inject:javax.inject:1'

Expand Down Expand Up @@ -157,20 +157,20 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.2.0'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.2.0'
testCompile 'org.junit.platform:junit-platform-launcher:1.2.0'
testCompile 'org.junit-pioneer:junit-pioneer:0.1-SNAPSHOT'
testCompile 'org.junit-pioneer:junit-pioneer:0.1.2'
testRuntime 'org.apache.logging.log4j:log4j-core:2.11.0'
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.0'
testCompile 'org.mockito:mockito-core:2.18.3'
testCompile 'com.github.tomakehurst:wiremock:2.17.0'
testCompile 'org.mockito:mockito-core:2.20.0'
testCompile 'com.github.tomakehurst:wiremock:2.18.0'
testCompile 'org.assertj:assertj-swing-junit:3.8.0'
testCompile 'org.reflections:reflections:0.9.11'
testCompile 'org.xmlunit:xmlunit-core:2.6.0'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.0'
testCompile 'com.tngtech.archunit:archunit-junit:0.8.0'
testCompile 'com.tngtech.archunit:archunit-junit:0.8.3'
testCompile "org.testfx:testfx-core:4.0.+"
testCompile "org.testfx:testfx-junit5:4.0.+"

checkstyle 'com.puppycrawl.tools:checkstyle:8.10.1'
checkstyle 'com.puppycrawl.tools:checkstyle:8.11'
}

jacoco {
Expand All @@ -181,34 +181,38 @@ dependencyUpdates {
outputFormatter = "json"
}

//We have to use this as long as junit-pioneer has no official release
dependencyUpdates.revision = 'integration'

// We have some dependencies which cannot be updated due to various reasons.
dependencyUpdates.resolutionStrategy = {
componentSelection {
withModule("org.controlsfx:controlsfx") { ComponentSelection selection ->
componentSelection { rules ->
rules.all { ComponentSelection selection ->
if ( selection.candidate.module!="javax.inject" && selection.candidate.version ==~ /[0-9].*SNAPSHOT/ ) {
selection.reject("Ignore SNAPSHOT releases")
}
}
rules.withModule("org.controlsfx:controlsfx") { ComponentSelection selection ->
if (selection.candidate.version ==~ /9.*/) { // Reject version 9 or higher
selection.reject("Cannot be updated to 9.*.* until Jabref works with Java 9")
selection.reject("Cannot be updated to 9.*.* until Jabref works with Java 9")
}
}
rules.withModule("com.github.tomtung:latex2unicode_2.12") { ComponentSelection selection ->
if (selection.candidate.version ==~ /0.2.2/) { // Reject version higher than 2.0.2
selection.reject("Cannot be updated to 0.2.4 until JabRef is prepared for it")
}
}
withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection ->
rules.withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection ->
if (selection.candidate.version ==~ /2.*/) {
selection.reject("Cannot be upgraded to version 2")
}
}
withModule("mysql:mysql-connector-java") { ComponentSelection selection ->
rules.withModule("mysql:mysql-connector-java") { ComponentSelection selection ->
if (selection.candidate.version ==~ /[6-9].*/) {
selection.reject("http://dev.mysql.com/downloads/connector/j/ lists the version 5.* as last stable version.")
}
}
withModule("org.jacoco:org.jacoco.agent") { ComponentSelection selection ->
if (selection.candidate.version ==~ /0.8.*/) {
selection.reject("As a native plugin we cannot control the actual version of jacoco. This dependency should be hidden.")
}
}
withModule("org.jacoco:org.jacoco.ant") { ComponentSelection selection ->
if (selection.candidate.version ==~ /0.8.*/) {
selection.reject("As a native plugin we cannot control the actual version of jacoco. This dependency should be hidden.")
}
}

}
}

Expand Down
60 changes: 60 additions & 0 deletions docs/adr/0003-use-gradle-as-build-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Use Gradle as build tool

## Context and Problem Statement

Which build tool should be used?

## Considered Options

* [Maven](https://maven.apache.org/)
* [Gradle](https://gradle.org/)
* [Ant](https://ant.apache.org/)

## Decision Outcome

Chosen option: "Gradle", because it is lean and fits our development style.

## Pros and Cons of the Options

### Maven

* Good, because [there is a plugin for almost everything](https://www.slant.co/versus/2107/11592/~apache-maven_vs_gradle)
* Good, because [it has good integration with third party tools](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Good, because [it has robust performance](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Good, because [it has a high popularity](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Good, [if one favors declarative over imperative](https://www.slant.co/versus/2107/11592/~apache-maven_vs_gradle)
* Bad, because [getting a dependency list is not straight forward](https://stackoverflow.com/q/1677473/873282)
* Bad, because [it based on a fixed and linear model of phases](https://dzone.com/articles/gradle-vs-maven)
* Bad, because [it is hard to customize](https://www.slant.co/versus/2107/11592/~apache-maven_vs_gradle)
* Bad, because [it needs plugins for everything](https://www.slant.co/versus/2107/11592/~apache-maven_vs_gradle)
* Bad, because [it is verbose leading to huge build files](https://technologyconversations.com/2014/06/18/build-tools/)

### Gradle

* Good, because [its build scripts are short](https://technologyconversations.com/2014/06/18/build-tools/)
* Good, because [it follows the convention over configuration approach](https://www.safaribooksonline.com/library/view/building-and-testing/9781449306816/ch04.html)
* Good, because [it offers a graph-based task dependencies](https://dzone.com/articles/gradle-vs-maven)
* Good, because [it is easy to customize](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Good, because [it offers custom dependency scopes](https://gradle.org/maven-vs-gradle/)
* Good, because [it has good community support](https://linuxhint.com/ant-vs-maven-vs-gradle/)
* Good, because [its performance can be 100 times more than maven's performance](https://gradle.org/gradle-vs-maven-performance/).
* Bad, because [not that many plugins are available/maintained yet](https://blog.philipphauer.de/moving-back-from-gradle-to-maven/)
* Bad, because [it lacks a wide variety of application server integrations](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Bad, because [it has a medium popularity](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Bad, because [it allows custom build scripts which need to be debugged](https://www.softwareyoga.com/10-reasons-why-we-chose-maven-over-gradle/)

### Ant

* Good, because [it offers a lot of control over the build process](https://technologyconversations.com/2014/06/18/build-tools/)
* Good, because [it has an agile dependency manager](https://blog.alejandrocelaya.com/2014/02/22/dependency-management-in-java-projects-with-ant-and-ivy/)
* Good, because [it has a low learning curve](https://technologyconversations.com/2014/06/18/build-tools/)
* Bad, because [build scripts can quickly become huge](https://technologyconversations.com/2014/06/18/build-tools/)
* Bad, because [everything has to be written from scratch](http://www.baeldung.com/ant-maven-gradle)
* Bad, because [no conventions are enforced which can make it hard to understand someone else's build script](http://www.baeldung.com/ant-maven-gradle)
* Bad, because [it has nearly no community support](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Bad, because [it has a low popularity](http://pages.zeroturnaround.com/rs/zeroturnaround/images/java-build-tools-part-2.pdf)
* Bad, because [it offers too much freedom](https://www.slant.co/versus/2106/2107/~apache-ant_vs_apache-maven)

## Links

* GADR: <https://github.com/adr/gadr-java/blob/master/gadr-java--build-tool.md>
1 change: 1 addition & 0 deletions docs/adr/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This log lists the architectural decisions for JabRef.
- [ADR-0000](0000-use-markdown-architectural-decision-records.md) - Use Markdown Architectural Decision Records
- [ADR-0001](0001-use-crowdin-for-translations.md) - Use Crowdin for translations
- [ADR-0002](0002-use-slf4j-for-logging.md) - Use slf4j together with log4j2 for logging
- [ADR-0003](0003-use-gradle-as-build-tool.md) - Use Gradle as build tool

<!-- adrlogstop -->

Expand Down
10 changes: 5 additions & 5 deletions external-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ Project: AppleJavaExtensions
URL: https://developer.apple.com/legacy/library/samplecode/AppleJavaExtensions/Introduction/Intro.html
License: Apple License

Id: com.github.bkromhout:java-diff-utils
Project: java-diff-utils
URL: https://github.com/bkromhout/java-diff-utils
License: Apache-2.0

Id: com.github.tomtung
Project: latex2unicode
URL: https://github.com/tomtung/latex2unicode
Expand Down Expand Up @@ -120,6 +115,11 @@ Project: Java String Similarity
URL: https://github.com/tdebatty/java-string-similarity
License: MIT

Id: io.github.java-diff-utils:java-diff-utils
Project: java-diff-utils
URL: https://github.com/java-diff-utils/java-diff-utils
License: Apache-1.1

Id: mysql:mysql-connector-java
Project: MySQL Connector/J
URL: http://www.mysql.de/downloads/connector/j/
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file removed lib/spin.jar
Binary file not shown.
4 changes: 0 additions & 4 deletions src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@

public class JabRefGUI {

private static final String NIMBUS_LOOK_AND_FEEL = "javax.swing.plaf.nimbus.NimbusLookAndFeel";
private static final String WINDOWS_LOOK_AND_FEEL = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
private static final String OSX_AQUA_LOOK_AND_FEEL = "apple.laf.AquaLookAndFeel";

private static final Logger LOGGER = LoggerFactory.getLogger(JabRefGUI.class);

private static JabRefFrame mainFrame;
Expand Down
Loading

0 comments on commit 1d4db3d

Please sign in to comment.