Skip to content

Commit 1c12a4d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fixSetFiles
* upstream/master: (31 commits) Source tab entry duplication (#3360) Use CITE_COMMENT not only for external latex editors but also for cop… (#3351) Updating with new translations (#3348) Upgrade error-prone (#3350) Jabref_pt_BR partially updated (#3349) Used late initialization for context menus (#3340) Fix NPE when calling with bib file as cmd argument (#3343) update mockito-core from 2.10.0 -> 2.11.0 (#3338) Remove underscore in Localized messages (#3336) Localisation: French: new entries translated (#3337) Refactoring: Lazy init of all editor tabs (#3333) Initializing EntryEditor Tabs on focus (#3331) Fix #3292: annotations are now automatically refreshed (#3325) Change integrity message for names depending on database mode (#3330) Fix location bundle with fast access (#3327) Small code cleanup Fix "path not found" exception Small fix in drag and drop handler of linked files (#3328) Fix NPE in MainTable (#3318) Increase relative size of abstract field in editor (#3320) ...
2 parents d1cf1b6 + 6bb21d4 commit 1c12a4d

File tree

87 files changed

+1270
-1369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1270
-1369
lines changed

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,25 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
1717
- Updated French translation
1818
- We improved the handling of abstracts in the "Astrophysics Data System" fetcher. [#2471](https://github.com/JabRef/jabref/issues/2471)
1919
- We added support for pasting entries in different formats [#3143](https://github.com/JabRef/jabref/issues/3143)
20+
- In the annotation tab, PDF files are now monitored for new or changed annotation. A manual reload is no longer necessary. [#3292](https://github.com/JabRef/jabref/issues/3292)
21+
- We increased the relative size of the "abstract" field in the entry editor. [Feature request in the forum](http://discourse.jabref.org/t/entry-preview-in-version-4/827)
2022
- Crossreferenced entries are now used when a BibTex key is generated for an entry with empty fields. [#2811](https://github.com/JabRef/jabref/issues/2811)
2123
- We now set the WM_CLASS of the UI to org-jabref-JabRefMain to allow certain Un*x window managers to properly identify its windows
2224
- We changed the default paths for the OpenOffice/LibreOffice binaries to the default path for LibreOffice
25+
- We no longer create a new entry editor when selecting a new entry to increase performance. [#3187](https://github.com/JabRef/jabref/pull/3187)
26+
- We increased performance and decreased the memory footprint of the entry editor drastically. [#3331](https://github.com/JabRef/jabref/pull/3331)
27+
- Late initialization of the context menus in the entry editor. This improves performance and memory footprint further [#3340](https://github.com/JabRef/jabref/pull/3340)
2328

2429

2530
### Fixed
31+
- We fixed the translation of \textendash in the entry preview [#3307](https://github.com/JabRef/jabref/issues/3307)
2632
- We fixed an issue where JabRef would not terminated after asking to collect anonymous statistics [#2955 comment](https://github.com/JabRef/jabref/issues/2955#issuecomment-334591123)
27-
- We fixed an issue where JabRef would not shut down when started with the '-n' (No GUI) option.
33+
- We fixed an issue where JabRef would not shut down when started with the '-n' (No GUI) option. [#3247](https://github.com/JabRef/jabref/issues/3247)
2834
- We improved the way metadata is updated in remote databases. [#3235](https://github.com/JabRef/jabref/issues/3235)
29-
35+
- We improved font rendering of the Entry Editor for Linux based systems [#3295](https://github.com/JabRef/jabref/issues/3295)
36+
- We fixed an issue where JabRef would freeze when trying to replace the original entry after a merge with new information from identifiers like DOI/ISBN etc. [3294](https://github.com/JabRef/jabref/issues/3294)
37+
- We fixed an issue where JabRef would not show the translated content at some points, although there existed a translation
38+
- We fixed an issue where editing in the source tab would override content of other entries [#3352](https://github.com/JabRef/jabref/issues/3352#issue-268580818)
3039
### Removed
3140

3241

build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
id "de.sebastianboegl.shadow.transformer.log4j" version "2.1.1"
1010
id "com.simonharrer.modernizer" version '1.5.0-1'
1111
id 'me.champeau.gradle.jmh' version '0.4.3'
12-
id 'net.ltgt.errorprone' version '0.0.11'
12+
id 'net.ltgt.errorprone' version '0.0.13'
1313
}
1414

1515
// use the gradle build scan feature: https://scans.gradle.com/get-started
@@ -104,11 +104,13 @@ dependencies {
104104
compile 'de.codecentric.centerdevice:javafxsvg:1.2.1'
105105
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
106106
compile 'de.saxsys:mvvmfx-validation:1.7.0'
107-
compile 'org.controlsfx:controlsfx:8.40.14'
108107
compile 'org.fxmisc.easybind:easybind:1.0.3'
109108
compile 'org.fxmisc.flowless:flowless:0.5.2'
110109
compile 'org.fxmisc.richtext:richtextfx:0.7-M5'
111110

111+
// Cannot be updated to 9.*.* until Jabref works with Java 9
112+
compile 'org.controlsfx:controlsfx:8.40.14'
113+
112114
compile 'org.jsoup:jsoup:1.10.3'
113115
compile 'com.mashape.unirest:unirest-java:1.4.9'
114116

@@ -122,13 +124,13 @@ dependencies {
122124
compile 'org.citationstyles:locales:1.0.1-SNAPSHOT'
123125
compile 'de.undercouch:citeproc-java:1.0.1'
124126

125-
compile 'com.github.tomtung:latex2unicode_2.12:0.2.1'
127+
compile 'com.github.tomtung:latex2unicode_2.12:0.2.2'
126128

127-
compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '1.0.+'
128-
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '1.0.+'
129+
compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '1.0.9'
130+
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '1.0.9'
129131

130132
testCompile 'junit:junit:4.12'
131-
testCompile 'org.mockito:mockito-core:2.10.0'
133+
testCompile 'org.mockito:mockito-core:2.11.0'
132134
testCompile 'com.github.tomakehurst:wiremock:2.8.0'
133135
testCompile 'org.assertj:assertj-swing-junit:3.8.0'
134136
testCompile 'org.reflections:reflections:0.9.11'
@@ -353,7 +355,7 @@ task media(type: com.install4j.gradle.Install4jTask, dependsOn: "releaseJar") {
353355
checkstyle {
354356
// do not use other packages for checkstyle, excluding gen(erated) sources
355357
checkstyleMain.source = "src/main/java"
356-
toolVersion = '8.0'
358+
toolVersion = '8.3'
357359
}
358360

359361
checkstyleMain.shouldRunAfter test

gradle/wrapper/gradle-wrapper.jar

0 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip

src/main/java/org/jabref/Globals.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import java.util.Optional;
55
import java.util.UUID;
66

7-
import org.jabref.collab.FileUpdateMonitor;
87
import org.jabref.gui.GlobalFocusListener;
98
import org.jabref.gui.StateManager;
109
import org.jabref.gui.keyboard.KeyBindingRepository;
1110
import org.jabref.gui.util.DefaultTaskExecutor;
11+
import org.jabref.gui.util.FileUpdateMonitor;
1212
import org.jabref.gui.util.TaskExecutor;
1313
import org.jabref.logic.importer.ImportFormatReader;
1414
import org.jabref.logic.journals.JournalAbbreviationLoader;

src/main/java/org/jabref/JabRefGUI.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,13 @@ private void setLookAndFeel() {
272272
LOGGER.warn("Unable to find requested look and feel", e);
273273
}
274274
}
275+
276+
// On Linux, Java FX fonts look blurry per default. This can be improved by using a non-default rendering
277+
// setting. See https://github.com/woky/javafx-hates-linux
278+
if (Globals.prefs.getBoolean(JabRefPreferences.FX_FONT_RENDERING_TWEAK)) {
279+
System.setProperty("prism.text", "t2k");
280+
System.setProperty("prism.lcdtext", "true");
281+
}
275282
} catch (Exception e) {
276283
LOGGER.warn("Look and feel could not be set", e);
277284
}

src/main/java/org/jabref/JabRefMain.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ private static void start(String[] args) {
6666

6767
Globals.prefs = preferences;
6868
Globals.startBackgroundTasks();
69-
Localization.setLanguage(preferences.get(JabRefPreferences.LANGUAGE));
69+
70+
// Note that the language was already set during the initialization of the preferences and it is safe to
71+
// call the next function.
7072
Globals.prefs.setLanguageDependentDefaultValues();
7173

7274
// Perform Migrations

src/main/java/org/jabref/cli/ArgumentProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ private void regenerateBibtexKeys(List<ParserResult> loaded) {
519519
database, entry, Globals.prefs.getBibtexKeyPatternPreferences());
520520
}
521521
} else {
522-
LOGGER.info(Localization.lang("No meta data present in BIB_file. Cannot regenerate BibTeX keys"));
522+
LOGGER.info(Localization.lang("No meta data present in BIB file. Cannot regenerate BibTeX keys"));
523523
}
524524
}
525525
}

src/main/java/org/jabref/collab/ChangeDisplayDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public ChangeDisplayDialog(JFrame owner, final BasePanel panel,
103103
if (anyDisabled) {
104104
panel.markBaseChanged();
105105
}
106-
panel.setUpdatedExternally(false);
106+
panel.markExternalChangesAsResolved();
107107
dispose();
108108
okPressed = true;
109109
});

src/main/java/org/jabref/collab/ChangeScanner.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class ChangeScanner implements Runnable {
4949

5050
private static final double MATCH_THRESHOLD = 0.4;
5151
private final File file;
52+
private final Path tempFile;
5253
private final BibDatabase databaseInMemory;
5354
private final MetaData metadataInMemory;
5455

@@ -67,20 +68,20 @@ public class ChangeScanner implements Runnable {
6768

6869
// NamedCompound edit = new NamedCompound("Merged external changes")
6970

70-
public ChangeScanner(JabRefFrame frame, BasePanel bp, File file) {
71+
public ChangeScanner(JabRefFrame frame, BasePanel bp, File file, Path tempFile) {
7172
this.panel = bp;
7273
this.frame = frame;
7374
this.databaseInMemory = bp.getDatabase();
7475
this.metadataInMemory = bp.getBibDatabaseContext().getMetaData();
7576
this.file = file;
77+
this.tempFile = tempFile;
7678
}
7779

7880
@Override
7981
public void run() {
8082
try {
8183

8284
// Parse the temporary file.
83-
Path tempFile = Globals.getFileUpdateMonitor().getTempFile(panel.fileMonitorHandle());
8485
ImportFormatPreferences importFormatPreferences = Globals.prefs.getImportFormatPreferences();
8586
ParserResult result = OpenDatabase.loadDatabase(tempFile.toFile(), importFormatPreferences);
8687
databaseInTemp = result.getDatabase();
@@ -153,7 +154,7 @@ private void storeTempDatabase() {
153154
Defaults defaults = new Defaults(Globals.prefs.getDefaultBibDatabaseMode());
154155
BibDatabaseWriter<SaveSession> databaseWriter = new BibtexDatabaseWriter<>(FileSaveSession::new);
155156
SaveSession ss = databaseWriter.saveDatabase(new BibDatabaseContext(databaseInTemp, metadataInTemp, defaults), prefs);
156-
ss.commit(Globals.getFileUpdateMonitor().getTempFile(panel.fileMonitorHandle()));
157+
ss.commit(tempFile);
157158
} catch (SaveException ex) {
158159
LOGGER.warn("Problem updating tmp file after accepting external changes", ex);
159160
}

0 commit comments

Comments
 (0)