Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into updateGradleDeps
Browse files Browse the repository at this point in the history
* upstream/master: (61 commits)
  fix missing l10n from previous merge
  fix compile error
  Fix right clicking on any entry and selecting "Open folder" results in the NullPointer exception (#4797)
  Bump fontbox from 2.0.14 to 2.0.15 (#4882)
  Bump pdfbox from 2.0.14 to 2.0.15 (#4881)
  Bump xmpbox from 2.0.14 to 2.0.15 (#4883)
  Bump mockito-core from 2.26.0 to 2.27.0 (#4879)
  Bump java-string-similarity from 1.1.0 to 1.2.1 (#4878)
  Fix JabRef dying silently without enough inotify instances (#4875)
  #4795 disable menu item if database not connected (#4828)
  Remove deprecated awt apple extension (#4860)
  Fix IllegalArgumentException when ranking entries (#4779)
  Bump junit-vintage-engine from 5.4.1 to 5.4.2 (#4866)
  Bump junit-platform-launcher from 1.4.1 to 1.4.2 (#4865)
  Bump junit-jupiter from 5.4.1 to 5.4.2 (#4867)
  Add author normalizer for medline import (#4863)
  Fixed group creation with default settings (#4801)
  removed default constructor of FXDialogService (#4847)
  QuotedStringTokenizer now does not unquote (#4830)
  Bump juh from 5.4.2 to 6.2.2 (#4851)
  ...
  • Loading branch information
Siedlerchr committed Apr 13, 2019
2 parents 9300128 + 504c0d3 commit 5ded28a
Show file tree
Hide file tree
Showing 151 changed files with 1,398 additions and 4,744 deletions.
3 changes: 2 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,5 @@ Johannes Manner <johannes.manner@web.de>
Dominik Traczyk <dominik646@gmail.com>
Cerrianne Santos <cerrianne.santos@gmail.com>
Stefan Scheffel <st155160@stud.uni-stuttgart.de>
Stefan Gerzmann <steppery@gmx.de>
Stefan Gerzmann <steppery@gmx.de>
Deepak Kumar <deepakkumar24196@gmail.com>
16 changes: 13 additions & 3 deletions 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 changed the latex command removal for docbook exporter. [#3838](https://github.com/JabRef/jabref/issues/3838)
- We changed the location of some fields in the entry editor (you might need to reset your preferences for these changes to come into effect)
- Journal/Year/Month in biblatex mode -> Deprecated (if filled)
- DOI/URL: General -> Optional
Expand Down Expand Up @@ -60,8 +61,12 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We changed the title of Group Dialog to "Add subgroup" from "Edit group" when we select Add subgroup option.
- We enable import button only if entries are selected. [#4755](https://github.com/JabRef/jabref/issues/4755)
- We made modifications to improve contrast of UI elements. [#4583](https://github.com/JabRef/jabref/issues/4583)
- We added an option in the settings to set the default action in JabRef when right clicking on any entry in any database and selecting "Open folder". [#4763](https://github.com/JabRef/jabref/issues/4763)
- The Medline fetcher now normalizes the author names according to the BibTeX-Standard [#4345](https://github.com/JabRef/jabref/issues/4345)


### Fixed
- We fixed an issue where JabRef died silently for the user without enough inotify instances [#4874](https://github.com/JabRef/jabref/issues/4847)
- We fixed an issue where corresponding groups are sometimes not highlighted when clicking on entries [#3112](https://github.com/JabRef/jabref/issues/3112)
- We fixed an issue where custom exports could not be selected in the 'Export (selected) entries' dialog [#4013](https://github.com/JabRef/jabref/issues/4013)
- Italic text is now rendered correctly. https://github.com/JabRef/jabref/issues/3356
Expand All @@ -73,6 +78,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- 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 a non-existing aux file in a group made it impossible to open the library. [#4735](https://github.com/JabRef/jabref/issues/4735)
- 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
Expand All @@ -86,6 +92,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the default icon of a group was not colored correctly.
- We fixed an issue where the first field in entry editor was not focused when adding a new entry. [#4024](https://github.com/JabRef/jabref/issues/4024)
- We reworked the "Edit file" dialog to make it resizeable and improved the workflow for adding and editing files https://github.com/JabRef/jabref/issues/2970
- We fixed an issue where custom name formatters were no longer found correctly. [#3531](https://github.com/JabRef/jabref/issues/3531)
- We fixed an issue where the month was not shown in the preview https://github.com/JabRef/jabref/issues/3239.
- Rewritten logic to detect a second jabref instance. [#4023](https://github.com/JabRef/jabref/issues/4023)
- 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)
Expand All @@ -99,14 +106,18 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where only one PDF file could be imported [#4422](https://github.com/JabRef/jabref/issues/4422)
- We fixed an issue where "Move to group" would always move the first entry in the library and not the selected [#4414](https://github.com/JabRef/jabref/issues/4414)
- We fixed an issue where an older dialog appears when downloading full texts from the quality menu. [#4489](https://github.com/JabRef/jabref/issues/4489)


- We fixed an issue where right clicking on any entry in any database and selecting "Open folder" results in the NullPointer exception. [#4763](https://github.com/JabRef/jabref/issues/4763)
- We fixed an issue where option 'open terminal here' with custom command was passing wrong argument. [#4802](https://github.com/JabRef/jabref/issues/4802)
- We fixed an issue where ranking an entry would generate an IllegalArgumentException. [#4754](https://github.com/JabRef/jabref/issues/4754)
- We fixed an issue where special characters where removed from non label key generation pattern parts [#4767](https://github.com/JabRef/jabref/issues/4767)
- We fixed an issue where the RIS import would overwite the article date with the value of the acessed date [#4816](https://github.com/JabRef/jabref/issues/4816)



### Removed
- The feature to "mark entries" was removed and merged with the groups functionality. For migration, a group is created for every value of the `__markedentry` field and the entry is added to this group.
- The number column was removed.
- We removed the global search feature.
- We removed the coloring of cells in the maintable according to whether the field is optional/required.
- We removed the feature to find and resolve duplicate BibTeX keys (as this use case is already covered by the integrity check).
- We removed a few commands from the right-click menu that are not needed often and thus don't need to be placed that prominently:
Expand Down Expand Up @@ -144,7 +155,6 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#






## Older versions
Expand Down
32 changes: 16 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ dependencies {
compile 'com.jgoodies:jgoodies-common:1.8.1'
compile 'com.jgoodies:jgoodies-forms:1.9.0'

compile 'org.apache.pdfbox:pdfbox:2.0.14'
compile 'org.apache.pdfbox:fontbox:2.0.14'
compile 'org.apache.pdfbox:xmpbox:2.0.14'
compile 'org.apache.pdfbox:pdfbox:2.0.15'
compile 'org.apache.pdfbox:fontbox:2.0.15'
compile 'org.apache.pdfbox:xmpbox:2.0.15'

compile group: 'org.apache.tika', name: 'tika-core', version: '1.20'

Expand All @@ -104,13 +104,13 @@ dependencies {

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

compile "org.libreoffice:juh:5.4.2"
compile "org.libreoffice:jurt:5.4.2"
compile "org.libreoffice:ridl:5.4.2"
compile "org.libreoffice:unoil:5.4.2"
compile "org.libreoffice:juh:6.2.2"
compile "org.libreoffice:jurt:6.2.2"
compile "org.libreoffice:ridl:6.2.2"
compile "org.libreoffice:unoil:6.2.2"

compile 'io.github.java-diff-utils:java-diff-utils:4.0'
compile 'info.debatty:java-string-similarity:1.1.0'
compile 'info.debatty:java-string-similarity:1.2.1'

antlr3 'org.antlr:antlr:3.5.2'
compile 'org.antlr:antlr-runtime:3.5.2'
Expand Down Expand Up @@ -159,23 +159,23 @@ dependencies {
compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.3.1'
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.3.1'

testImplementation 'org.junit.jupiter:junit-jupiter:5.4.0'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.4.0'
testCompile 'org.junit.platform:junit-platform-launcher:1.4.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.4.2'
testCompile 'org.junit.platform:junit-platform-launcher:1.4.2'

testRuntime 'org.apache.logging.log4j:log4j-core:2.11.1'
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.2'
testCompile 'org.mockito:mockito-core:2.25.0'
testCompile 'com.github.tomakehurst:wiremock:2.21.0'
testCompile 'org.mockito:mockito-core:2.27.0'
testCompile 'com.github.tomakehurst:wiremock:2.22.0'
testCompile 'org.reflections:reflections:0.9.11'
testCompile 'org.xmlunit:xmlunit-core:2.6.2'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.2'
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.9.3'
testCompile 'com.tngtech.archunit:archunit-junit5-api:0.9.3'
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.10.2'
testCompile 'com.tngtech.archunit:archunit-junit5-api:0.10.2'
testCompile "org.testfx:testfx-core:4.0.+"
testCompile "org.testfx:testfx-junit5:4.0.+"

checkstyle 'com.puppycrawl.tools:checkstyle:8.18'
checkstyle 'com.puppycrawl.tools:checkstyle:8.19'
}

jacoco {
Expand Down
Binary file removed lib/AppleJavaExtensions.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/JabRefException.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public JabRefException(Throwable cause) {
@Override
public String getLocalizedMessage() {
if (localizedMessage == null) {
LOGGER.debug("No localized message exception message defined. Falling back to getMessage().");
LOGGER.debug("No localized exception message defined. Falling back to getMessage().");
return getMessage();
} else {
return localizedMessage;
Expand Down
48 changes: 15 additions & 33 deletions src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import javafx.stage.Stage;

import org.jabref.gui.BasePanel;
import org.jabref.gui.DialogService;
import org.jabref.gui.FXDialogService;
import org.jabref.gui.GUIGlobals;
import org.jabref.gui.JabRefFrame;
import org.jabref.gui.dialogs.BackupUIManager;
Expand Down Expand Up @@ -43,14 +41,13 @@ public class JabRefGUI {
private final boolean isBlank;
private final List<ParserResult> failed = new ArrayList<>();
private final List<ParserResult> toOpenTab = new ArrayList<>();
private final DialogService dialogService;

private final String focusedFile;

public JabRefGUI(Stage mainStage, List<ParserResult> argsDatabases, boolean isBlank) {
this.bibDatabases = argsDatabases;
this.isBlank = isBlank;
this.dialogService = new FXDialogService(mainStage);
mainFrame = new JabRefFrame(mainStage);

// passed file (we take the first one) should be focused
focusedFile = argsDatabases.stream()
Expand All @@ -60,22 +57,12 @@ public JabRefGUI(Stage mainStage, List<ParserResult> argsDatabases, boolean isBl
.orElse(Globals.prefs.get(JabRefPreferences.LAST_FOCUSED));

openWindow(mainStage);
new VersionWorker(Globals.BUILD_INFO.getVersion(), Globals.prefs.getVersionPreferences().getIgnoredVersion(), JabRefGUI.getMainFrame().getDialogService(), Globals.TASK_EXECUTOR)
new VersionWorker(Globals.BUILD_INFO.getVersion(), Globals.prefs.getVersionPreferences().getIgnoredVersion(), mainFrame.getDialogService(), Globals.TASK_EXECUTOR)
.checkForNewVersionAsync(false);
}

private void openWindow(Stage mainStage) {
// Set antialiasing on everywhere. This only works in JRE >= 1.5.
// Or... it doesn't work, period.
// TODO test and maybe remove this! I found this commented out with no additional info ( payload@lavabit.com )
// Enabled since JabRef 2.11 beta 4
System.setProperty("swing.aatext", "true");
// Default is "on".
// "lcd" instead of "on" because of http://wiki.netbeans.org/FaqFontRendering and http://docs.oracle.com/javase/6/docs/technotes/guides/2d/flags.html#aaFonts
System.setProperty("awt.useSystemAAFontSettings", "lcd");

// look and feel. This MUST be the first thing to do before loading any Swing-specific code!
setLookAndFeel();
applyFontRenderingTweak();

// If the option is enabled, open the last edited libraries, if any.
if (!isBlank && Globals.prefs.getBoolean(JabRefPreferences.OPEN_LAST_EDITED)) {
Expand All @@ -85,7 +72,7 @@ private void openWindow(Stage mainStage) {
GUIGlobals.init();

LOGGER.debug("Initializing frame");
JabRefGUI.mainFrame = new JabRefFrame(mainStage);
mainFrame.init();

// Add all bibDatabases databases to the frame:
boolean first = false;
Expand All @@ -109,7 +96,7 @@ private void openWindow(Stage mainStage) {
pr.getDatabase().clearSharedDatabaseID();

LOGGER.error("Connection error", e);
dialogService.showErrorDialogAndWait(
mainFrame.getDialogService().showErrorDialogAndWait(
Localization.lang("Connection error"),
Localization.lang("A local copy will be opened."),
e);
Expand All @@ -120,15 +107,15 @@ private void openWindow(Stage mainStage) {
// add them to the list
toOpenTab.add(pr);
} else {
JabRefGUI.getMainFrame().addParserResult(pr, first);
mainFrame.addParserResult(pr, first);
first = false;
}
}
}

// finally add things to the currently opened tab
for (ParserResult pr : toOpenTab) {
JabRefGUI.getMainFrame().addParserResult(pr, first);
mainFrame.addParserResult(pr, first);
first = false;
}

Expand Down Expand Up @@ -168,14 +155,14 @@ private void openWindow(Stage mainStage) {
String message = Localization.lang("Error opening file '%0'.", pr.getFile().get().getName()) + "\n"
+ pr.getErrorMessage();

dialogService.showErrorDialogAndWait(Localization.lang("Error opening file"), message);
mainFrame.getDialogService().showErrorDialogAndWait(Localization.lang("Error opening file"), message);

}

// Display warnings, if any
int tabNumber = 0;
for (ParserResult pr : bibDatabases) {
ParserResultWarningDialog.showParserResultWarningDialog(pr, JabRefGUI.getMainFrame(), tabNumber++);
ParserResultWarningDialog.showParserResultWarningDialog(pr, mainFrame, tabNumber++);
}

// After adding the databases, go through each and see if
Expand All @@ -187,9 +174,9 @@ private void openWindow(Stage mainStage) {
// This is because importToOpen might have been used, which adds to
// loadedDatabases, but not to getBasePanelCount()

for (int i = 0; (i < bibDatabases.size()) && (i < JabRefGUI.getMainFrame().getBasePanelCount()); i++) {
for (int i = 0; (i < bibDatabases.size()) && (i < mainFrame.getBasePanelCount()); i++) {
ParserResult pr = bibDatabases.get(i);
BasePanel panel = JabRefGUI.getMainFrame().getBasePanelAt(i);
BasePanel panel = mainFrame.getBasePanelAt(i);
OpenDatabaseAction.performPostOpenActions(panel, pr);
}

Expand Down Expand Up @@ -219,7 +206,7 @@ private void openLastEditedDatabases() {
}

if (BackupManager.checkForBackupFile(dbFile.toPath())) {
BackupUIManager.showRestoreBackupDialog(dialogService, dbFile.toPath());
BackupUIManager.showRestoreBackupDialog(mainFrame.getDialogService(), dbFile.toPath());
}

ParserResult parsedDatabase = OpenDatabase.loadDatabase(fileName,
Expand All @@ -242,9 +229,9 @@ private boolean isLoaded(File fileToOpen) {
return false;
}

private void setLookAndFeel() {
// On Linux, Java FX fonts look blurry per default. This can be improved by using a non-default rendering
// setting. See https://github.com/woky/javafx-hates-linux
private void applyFontRenderingTweak() {
// On Linux, Java FX fonts look blurry per default. This can be improved by using a non-default rendering setting.
// See https://github.com/woky/javafx-hates-linux
if (Globals.prefs.getBoolean(JabRefPreferences.FX_FONT_RENDERING_TWEAK)) {
System.setProperty("prism.text", "t2k");
System.setProperty("prism.lcdtext", "true");
Expand All @@ -254,9 +241,4 @@ private void setLookAndFeel() {
public static JabRefFrame getMainFrame() {
return mainFrame;
}

// Only used for testing, other than that do NOT set the mainFrame...
public static void setMainFrame(JabRefFrame mainFrame) {
JabRefGUI.mainFrame = mainFrame;
}
}
Loading

0 comments on commit 5ded28a

Please sign in to comment.