Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (21 commits)
  Update module description (#5999)
  New Crowdin translations (#5990)
  Fix NPE in OpenAccessDoi (#5994)
  Move generate BibTeX keys to Edit menu (#5987)
  Fixed display of groups and links column in MainTable (#5985)
  Fixed loosing group if the most bottom one in list is dragged on itself (#5983)
  Dividers (#5975)
  Add initial section on code quality (#5991)
  Create .sonarcloud.properties
  Add new IntelliJ video tutorial to docs. (#5984)
  Fix checkstyle
  Optimize stream() code
  Use application/x-bibtex for Grobid instance
  New Crowdin translations (#5971)
  Set BibEntry to "changed" state before setting a new entry type (#5966)
  Rework tools menu (#5979)
  Help menu (#5976)
  Fixed formatting
  Refactored subtile changes to optics of library properties (#5969)
  Change grobid URL to jabref subdomain (#5972)
  ...
  • Loading branch information
Siedlerchr committed Feb 24, 2020
2 parents f22a640 + d2de477 commit 6392f5b
Show file tree
Hide file tree
Showing 51 changed files with 1,608 additions and 945 deletions.
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#

### Changed

- We reintroduced the possibility to extract references from plain text (using GROBID) [#5614](https://github.com/JabRef/jabref/pull/5614)
- We reintroduced the possibility to extract references from plain text (using GROBID) [#5614](https://github.com/JabRef/jabref/pull/5614)
- We changed the open office panel to show buttons in rows of three instead of going straight down to save space as the button expanded out to take up unnecessary horizontal space. [#5479](https://github.com/JabRef/jabref/issues/5479)
- We cleaned up the group add/edit dialog. [#5826](https://github.com/JabRef/jabref/pull/5826)
- We reintroduced the index column. [#5844](https://github.com/JabRef/jabref/pull/5844)
Expand All @@ -37,8 +37,14 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed several issues concerning managing external file types: Now everything is usable and fully functional. Previously, there were problems with the radio buttons, with saving the settings and with loading an input field value. Furthermore, different behavior for Windows and other operating systems was given, which was unified as well. [#5846](https://github.com/JabRef/jabref/issues/5846)
- We fixed an issue where entries containing Unicode charaters were not parsed correctly [#5899](https://github.com/JabRef/jabref/issues/5899)
- We fixed an issue where an entry containing an external filename with curly braces could not be saved. Curly braces are now longer allowed in filenames. [#5899](https://github.com/JabRef/jabref/issues/5899)
- We fixed an issue where changing the type of an entry did not update the main table [#5906](https://github.com/JabRef/jabref/issues/5906)
- We fixed an issue where opening a library from the recent libraries menu was not possible [#5939](https://github.com/JabRef/jabref/issues/5939)
- We fixed an issue in the optics of the library properties, that cropped the dialog on scaled displays. [#5969](https://github.com/JabRef/jabref/issues/5969)
- We fixed an issue where changing the type of an entry did not update the main table. [#5906](https://github.com/JabRef/jabref/issues/5906)
- We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939)
- We fixed an issue where the most bottom group in the list got lost, if it was dragged on itself. [#5983](https://github.com/JabRef/jabref/issues/5983)
- We fixed an issue where changing entry type doesn't always work when biblatex source is shown. [#5905](https://github.com/JabRef/jabref/issues/5905)
- We fixed an issue where the group and the link column were not updated after changing the entry in the main table. [#5985](https://github.com/JabRef/jabref/issues/5985)

### Removed

Expand Down
70 changes: 55 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -582,41 +582,81 @@ jlink {

// TODO: Remove the following correction to the merged module
// The module descriptor automatically generated by the plugin for the merged module contained some invalid entries.
// Execute ./gradlew suggestMergedModuleInfo and include the incorrect directives here.
// Execute ./gradlew suggestMergedModuleInfo and include the suggested directives here.
mergedModule {
requires 'java.logging'
requires 'jdk.xml.dom'
requires 'java.sql'
requires 'java.rmi'
requires 'java.xml'
requires 'com.sun.xml.txw2'
requires 'com.google.gson'
requires 'java.desktop'
requires 'java.security.jgss'
requires 'jdk.jsobject'
requires 'org.objectweb.asm'
requires 'jdk.jfr'
requires 'jdk.unsupported'
requires 'com.google.gson'
requires 'java.management'
requires 'java.naming'
requires 'jdk.unsupported.desktop'
requires 'java.security.sasl'
requires 'com.sun.xml.fastinfoset'
requires 'jdk.security.jgss'
requires 'java.logging'
requires 'jdk.xml.dom'
requires 'java.sql'
requires 'java.rmi'
requires 'java.security.jgss'
requires 'com.oracle.truffle.regex'
requires 'jdk.jsobject'
requires 'jdk.management'
requires 'jdk.unsupported.desktop'
requires 'org.objectweb.asm.util'
requires 'java.scripting'
requires 'org.objectweb.asm.commons'
requires 'org.graalvm.truffle'
requires 'java.datatransfer'
requires 'java.compiler'
requires 'java.sql.rowset'
requires 'java.transaction.xa'
requires 'com.sun.xml.fastinfoset'
requires 'org.graalvm.sdk'
requires 'org.slf4j'
uses 'com.airhacks.afterburner.injection.PresenterFactory'
uses 'org.apache.logging.log4j.util.PropertySource'
uses 'org.apache.logging.log4j.core.util.WatchEventService'
uses 'org.apache.logging.log4j.plugins.processor.PluginService'
uses 'org.controlsfx.glyphfont.GlyphFont'
uses 'com.airhacks.afterburner.views.ResourceLocator'
uses 'com.oracle.truffle.js.runtime.Evaluator'
uses 'org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory'
uses 'com.airhacks.afterburner.injection.PresenterFactory'
uses 'com.oracle.truffle.js.runtime.builtins.JSFunctionLookup'
uses 'org.apache.logging.log4j.spi.Provider'
uses 'org.mariadb.jdbc.tls.TlsSocketPlugin'
uses 'org.mariadb.jdbc.LocalInfileInterceptor'
uses 'javax.xml.bind.JAXBContextFactory'
provides 'java.sql.Driver' with 'org.postgresql.Driver'
provides 'javax.annotation.processing.Processor' with 'org.apache.logging.log4j.plugins.processor.PluginProcessor'
provides 'org.controlsfx.glyphfont.GlyphFont' with 'org.controlsfx.glyphfont.FontAwesome'
provides 'org.apache.commons.logging.LogFactory' with 'org.apache.logging.log4j.jcl.LogFactoryImpl'
provides 'org.slf4j.spi.SLF4JServiceProvider' with 'org.apache.logging.slf4j.SLF4JServiceProvider'
provides 'org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory' with 'org.apache.logging.log4j.core.message.ExtendedThreadInfoFactory'
provides 'org.mariadb.jdbc.tls.TlsSocketPlugin' with 'org.mariadb.jdbc.internal.protocol.tls.DefaultTlsSocketPlugin'
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.ServerProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider'
provides 'com.oracle.truffle.js.runtime.Evaluator' with 'com.oracle.truffle.js.parser.GraalJSEvaluator'
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.NameResolverProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.internal.DnsNameResolverProvider'
provides 'java.security.Provider' with 'org.bouncycastle.jce.provider.BouncyCastleProvider', 'org.bouncycastle.pqc.jcajce.provider.BouncyCastlePQCProvider'
provides 'org.apache.logging.log4j.util.PropertySource' with 'org.apache.logging.log4j.util.EnvironmentPropertySource',
'org.apache.logging.log4j.util.SystemPropertiesPropertySource'
provides 'java.sql.Driver' with 'org.postgresql.Driver'
provides 'org.apache.logging.log4j.plugins.processor.PluginService' with 'org.apache.logging.log4j.plugins.convert.plugins.Log4jPlugins'
provides 'org.mariadb.jdbc.authentication.AuthenticationPlugin' with 'org.mariadb.jdbc.internal.com.send.authentication.CachingSha2PasswordPlugin',
'org.mariadb.jdbc.internal.com.send.authentication.ClearPasswordPlugin',
'org.mariadb.jdbc.internal.com.send.authentication.Ed25519PasswordPlugin',
'org.mariadb.jdbc.internal.com.send.authentication.NativePasswordPlugin',
'org.mariadb.jdbc.internal.com.send.authentication.OldPasswordPlugin',
'org.mariadb.jdbc.internal.com.send.authentication.SendGssApiAuthPacket',
'org.mariadb.jdbc.internal.com.send.authentication.SendPamAuthPacket',
'org.mariadb.jdbc.internal.com.send.authentication.Sha256PasswordPlugin'
provides 'org.mariadb.jdbc.credential.CredentialPlugin' with 'org.mariadb.jdbc.credential.aws.AwsIamCredentialPlugin',
'org.mariadb.jdbc.credential.env.EnvCredentialPlugin',
'org.mariadb.jdbc.credential.system.PropertiesCredentialPlugin'
provides 'org.apache.commons.logging.LogFactory' with 'org.apache.logging.log4j.jcl.LogFactoryImpl'
provides 'org.slf4j.spi.SLF4JServiceProvider' with 'org.apache.logging.slf4j.SLF4JServiceProvider'
provides 'org.apache.logging.log4j.spi.Provider' with 'org.apache.logging.log4j.core.impl.Log4jProvider'
provides 'java.security.Provider' with 'org.bouncycastle.jce.provider.BouncyCastleProvider',
'org.bouncycastle.pqc.jcajce.provider.BouncyCastlePQCProvider'
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.ManagedChannelProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider'
provides 'com.oracle.truffle.js.runtime.builtins.JSFunctionLookup' with 'com.oracle.truffle.js.builtins.JSDefaultBuiltinLookup'
}

jpackage {
Expand Down
9 changes: 5 additions & 4 deletions buildres/windows/JabRefHost.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Respond($response) {
}
}

$jabRefExe = [System.IO.Path]::Combine($PSScriptRoot, "JabRef.exe")
$jabRefExe = [System.IO.Path]::Combine($PSScriptRoot, "runtime\\bin\\JabRef.bat")

try {
$reader = New-Object System.IO.BinaryReader([System.Console]::OpenStandardInput())
Expand All @@ -37,9 +37,10 @@ try {
#$wshell = New-Object -ComObject Wscript.Shell
#$wshell.Popup($message.Text,0,"JabRef", 0x0 + 0x30)

$messageText = $message.Text
$output = & $jabRefExe -importBibtex "$messageText" 2>&1
#$output = & echoargs -importBibtex $messageText 2>&1
$messageText = $message.Text.replace("`n"," ").replace("`r"," ")
$output = & $jabRefExe -importBibtex "$messageText" *>&1
#$output = "$messageText"
#$wshell = New-Object -ComObject Wscript.Shell
#$wshell.Popup($output,0,"JabRef", 0x0 + 0x30)
return Respond @{message="ok";output="$output"}
} finally {
Expand Down
12 changes: 12 additions & 0 deletions docs/code-quality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Code Quality

We monitor the general source code quality at three places:

* [Teamscale](https://www.cqse.eu/de/produkte/teamscale/landing/) is a popular German product analyzing code quality. The analysis results are available at <https://demo.teamscale.com/dashboard.html#show//?id=kinnen%2FJabref%20Overview>.
* [codacy](https://www.codacy.com/) is a hosted service to monitor code quality. The code quality analysis for JabRef is available at <https://www.codacy.com/app/simonharrer/jabref/dashboard>.
* [codecov](https://codecov.io/) is a solution to check code coverage of test cases. The code coverage metrics for JabRef are available at <https://codecov.io/github/JabRef/jabref>.

We strongly recommend to read following two books on code quality:

* [Java by Comparison](java.by-comparison.com/) is a book by three JabRef developers which focuses on code improvements close to single statements. It is fast to read and one gains much information from each recommendation discussed in the book.
* [Effective Java](https://www.oreilly.com/library/view/effective-java-3rd/9780134686097/) is the standard book for advanced Java programming. Did you know that `enum` is the [recommended way to enforce a singleton instance of a class](https://learning.oreilly.com/library/view/effective-java-3rd/9780134686097/ch2.xhtml#lev3)? Did you know that one should [refer to objects by their interfaces](https://learning.oreilly.com/library/view/effective-java-3rd/9780134686097/ch9.xhtml#lev64)?
10 changes: 5 additions & 5 deletions docs/guidelines-for-setting-up-a-local-workspace.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Setup a local workspace
# Set up a local workspace

This guide explains how to set up your environment for development of JabRef. It includes information about prerequisites, configuring your IDE, and running JabRef locally to verify your setup.

For a complete step-by-step guide (using IntellJ as the IDE), have a look at the following video instructions:
For a complete step-by-step guide for Linux using IntellJ IDEA as the IDE, have a look at the following video instructions:

<p align="center">
<a href="http://www.youtube.com/watch?v=FeQpygT0314"><img src="http://img.youtube.com/vi/FeQpygT0314/0.jpg" /></a>
</p>
<a href="https://youtu.be/JkFVJ6p0urw">
<img src="https://img.youtube.com/vi/JkFVJ6p0urw/mqdefault.jpg" alt="JabRef development video tutorial"/>
</a>

## Prerequisites

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
requires java.sql;

// JavaFX
requires javafx.base;
requires javafx.graphics;
requires javafx.swing;
requires javafx.controls;
Expand Down Expand Up @@ -72,9 +73,10 @@
requires java.string.similarity;
requires ojdbc10;
requires org.postgresql.jdbc;
requires org.mariadb.jdbc;
uses org.mariadb.jdbc.credential.CredentialPlugin;
requires org.apache.commons.lang3;
requires org.antlr.antlr4.runtime;
requires flowless;
requires org.apache.tika.core;
requires javafx.base;
}
26 changes: 14 additions & 12 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ private Node createToolbar() {
factory.createIconButton(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, stateManager)),
factory.createIconButton(StandardActions.CLEANUP_ENTRIES, new OldDatabaseCommandWrapper(Actions.CLEANUP, this, stateManager)),
new Separator(Orientation.VERTICAL),
factory.createIconButton(StandardActions.FORK_ME, new OpenBrowserAction("https://github.com/JabRef/jabref")),
factory.createIconButton(StandardActions.OPEN_GITHUB, new OpenBrowserAction("https://github.com/JabRef/jabref")),
factory.createIconButton(StandardActions.OPEN_FACEBOOK, new OpenBrowserAction("https://www.facebook.com/JabRef/")),
factory.createIconButton(StandardActions.OPEN_TWITTER, new OpenBrowserAction("https://twitter.com/jabref_org"))
);
Expand Down Expand Up @@ -712,18 +712,23 @@ private MenuBar createMenu() {

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.REPLACE_ALL, new OldDatabaseCommandWrapper(Actions.REPLACE_ALL, this, stateManager)),
factory.createMenuItem(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, stateManager)),

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.MANAGE_KEYWORDS, new ManageKeywordsAction(stateManager))
);

if (Globals.prefs.getBoolean(JabRefPreferences.SPECIALFIELDSENABLED)) {
edit.getItems().addAll(
new SeparatorMenuItem(),
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.RANKING, factory, undoManager),
SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.RELEVANCE, factory),
SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.QUALITY, factory),
SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.PRINTED, factory),
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.PRIORITY, factory, undoManager),
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.READ_STATUS, factory, undoManager),
new SeparatorMenuItem()
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.READ_STATUS, factory, undoManager)
);
}

Expand Down Expand Up @@ -767,6 +772,9 @@ private MenuBar createMenu() {
tools.getItems().addAll(
factory.createMenuItem(StandardActions.PARSE_TEX, new ParseTexAction(stateManager)),
factory.createMenuItem(StandardActions.NEW_SUB_LIBRARY_FROM_AUX, new NewSubLibraryAction(this, stateManager)),

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this, stateManager)),
factory.createMenuItem(StandardActions.WRITE_XMP, new OldDatabaseCommandWrapper(Actions.WRITE_XMP, this, stateManager)),
factory.createMenuItem(StandardActions.COPY_LINKED_FILES, new CopyFilesAction(stateManager, this.getDialogService())),
Expand All @@ -778,8 +786,6 @@ private MenuBar createMenu() {

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, stateManager)),
factory.createMenuItem(StandardActions.REPLACE_ALL, new OldDatabaseCommandWrapper(Actions.REPLACE_ALL, this, stateManager)),
factory.createMenuItem(StandardActions.SEND_AS_EMAIL, new OldDatabaseCommandWrapper(Actions.SEND_AS_EMAIL, this, stateManager)),
pushToApplicationMenuItem,

Expand Down Expand Up @@ -845,23 +851,19 @@ private MenuBar createMenu() {

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.DONATE, new OpenBrowserAction("https://donations.jabref.org")),
factory.createMenuItem(StandardActions.SEARCH_FOR_UPDATES, new SearchForUpdateAction(Globals.BUILD_INFO, prefs.getVersionPreferences(), dialogService, Globals.TASK_EXECUTOR)),
factory.createSubMenu(StandardActions.WEB_MENU,
factory.createMenuItem(StandardActions.OPEN_WEBPAGE, new OpenBrowserAction("https://jabref.org/")),
factory.createMenuItem(StandardActions.OPEN_BLOG, new OpenBrowserAction("https://blog.jabref.org/")),
factory.createMenuItem(StandardActions.OPEN_FACEBOOK, new OpenBrowserAction("https://www.facebook.com/JabRef/")),
factory.createMenuItem(StandardActions.OPEN_TWITTER, new OpenBrowserAction("https://twitter.com/jabref_org")),
factory.createMenuItem(StandardActions.OPEN_GITHUB, new OpenBrowserAction("https://github.com/JabRef/jabref")),

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.FORK_ME, new OpenBrowserAction("https://github.com/JabRef/jabref")),
factory.createMenuItem(StandardActions.OPEN_DEV_VERSION_LINK, new OpenBrowserAction("https://builds.jabref.org/master/")),
factory.createMenuItem(StandardActions.OPEN_CHANGELOG, new OpenBrowserAction("https://github.com/JabRef/jabref/blob/master/CHANGELOG.md")),

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.DONATE, new OpenBrowserAction("https://donations.jabref.org"))

factory.createMenuItem(StandardActions.OPEN_CHANGELOG, new OpenBrowserAction("https://github.com/JabRef/jabref/blob/master/CHANGELOG.md"))
),
factory.createMenuItem(StandardActions.ABOUT, new AboutAction())
);
Expand Down
Loading

0 comments on commit 6392f5b

Please sign in to comment.