Skip to content

Commit 634bed4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into editStringsjavafx
* upstream/master: (21 commits) Bump applicationinsights-core from 2.3.0 to 2.3.1 (#4656) Bump applicationinsights-logging-log4j2 from 2.3.0 to 2.3.1 (#4657) Bump bcprov-jdk15on from 1.60 to 1.61 (#4653) Bump log4j-jcl from 2.11.1 to 2.11.2 (#4646) Bump log4j-api from 2.11.1 to 2.11.2 (#4650) Bump assertj-swing-junit from 3.8.0 to 3.9.2 (#4647) Bump log4j-jul from 2.11.1 to 2.11.2 (#4648) Bump log4j-slf4j18-impl from 2.11.1 to 2.11.2 (#4649) Bump log4j-core from 2.11.1 to 2.11.2 (#4651) Remove old code for PDF import (#4634) Reorder conditional checks Automatically created groups with Field to group by as entrytype (#4539) (#4555) Fix for issue 4641: Remove usage of TempDirectory extension from junit-pioneer (#4644) Edit localization file Add Integrity check for books with edition reported as 1 Use 'junit-jupiter' aggregator module (#4640) Bump junit-jupiter-params from 5.3.2 to 5.4.0 (#4638) Bump junit-vintage-engine from 5.3.2 to 5.4.0 (#4637) Bump junit-platform-launcher from 1.3.2 to 1.4.0 (#4636) Bump junit-jupiter-api from 5.3.2 to 5.4.0 (#4639) ... # Conflicts: # src/main/resources/l10n/JabRef_en.properties
2 parents 30d5bf1 + d95c06b commit 634bed4

File tree

120 files changed

+1066
-3001
lines changed

Some content is hidden

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

120 files changed

+1066
-3001
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
4848
- We updated updated the Related Articles tab to accept JSON from the new version of the Mr. DLib service
4949
- We added an option in the preference dialog box that allows user to choose behavior after dragging and dropping files in Entry Editor. [#4356](https://github.com/JabRef/jabref/issues/4356)
5050
- We added the ability to have an export preference where previously "File"-->"Export"/"Export selected entries" would not save the user's preference[#4495](https://github.com/JabRef/jabref/issues/4495)
51+
- For automatically created groups, added ability to filter groups by entry type. [#4539](https://github.com/JabRef/jabref/issues/4539)
5152
- We added the ability to add field names from the Preferences Dialog [#4546](https://github.com/JabRef/jabref/issues/4546)
5253
- We added the ability change the column widths directly in the main table. [#4546](https://github.com/JabRef/jabref/issues/4546)
5354
- We added the ability to execute default action in dialog by using with <kbd>Ctrl</kbd> + <kbd>Enter</kbd> combination [#4496](https://github.com/JabRef/jabref/issues/4496)

build.gradle

+12-18
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ dependencies {
102102
compile group: 'org.apache.tika', name: 'tika-core', version: '1.20'
103103

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

107107
compile 'commons-cli:commons-cli:1.4'
108108

@@ -147,32 +147,29 @@ dependencies {
147147

148148
// >1.8.0-beta is required for java 9 compatibility
149149
compile 'org.slf4j:slf4j-api:1.8.0-beta2'
150-
compile 'org.apache.logging.log4j:log4j-slf4j18-impl:2.11.1'
151-
compile 'org.apache.logging.log4j:log4j-jcl:2.11.1'
152-
compile 'org.apache.logging.log4j:log4j-api:2.11.1'
153-
compile 'org.apache.logging.log4j:log4j-core:2.11.1'
150+
compile 'org.apache.logging.log4j:log4j-slf4j18-impl:2.11.2'
151+
compile 'org.apache.logging.log4j:log4j-jcl:2.11.2'
152+
compile 'org.apache.logging.log4j:log4j-api:2.11.2'
153+
compile 'org.apache.logging.log4j:log4j-core:2.11.2'
154154

155155
compile 'de.undercouch:citeproc-java:1.0.1'
156156

157157
compile 'com.github.tomtung:latex2unicode_2.12:0.2.2'
158158

159159
errorproneJavac 'com.google.errorprone:javac:1.8.0-u20'
160160

161-
compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.3.0'
162-
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.3.0'
161+
compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.3.1'
162+
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.3.1'
163163

164-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.2'
165-
testCompile 'org.junit.jupiter:junit-jupiter-params:5.3.2'
166-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.2'
167-
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.3.2'
168-
testCompile 'org.junit.platform:junit-platform-launcher:1.3.2'
164+
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.0'
165+
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.4.0'
166+
testCompile 'org.junit.platform:junit-platform-launcher:1.4.0'
169167

170-
testCompile 'org.junit-pioneer:junit-pioneer:0.3.0'
171168
testRuntime 'org.apache.logging.log4j:log4j-core:2.11.1'
172-
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.1'
169+
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.2'
173170
testCompile 'org.mockito:mockito-core:2.24.0'
174171
testCompile 'com.github.tomakehurst:wiremock:2.21.0'
175-
testCompile 'org.assertj:assertj-swing-junit:3.8.0'
172+
testCompile 'org.assertj:assertj-swing-junit:3.9.2'
176173
testCompile 'org.reflections:reflections:0.9.11'
177174
testCompile 'org.xmlunit:xmlunit-core:2.6.2'
178175
testCompile 'org.xmlunit:xmlunit-matchers:2.6.2'
@@ -192,9 +189,6 @@ dependencyUpdates {
192189
outputFormatter = "json"
193190
}
194191

195-
//We have to use this as long as junit-pioneer has no official release
196-
dependencyUpdates.revision = 'integration'
197-
198192
// We have some dependencies which cannot be updated due to various reasons.
199193
dependencyUpdates.resolutionStrategy = {
200194
componentSelection { rules ->

src/main/java/org/jabref/gui/DuplicateResolverDialog.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void init(BibEntry one, BibEntry two, DuplicateResolverType type) {
6868
second = new ButtonType(Localization.lang("Remove entry from import"), ButtonData.APPLY);
6969
both = new ButtonType(Localization.lang("Keep both"), ButtonData.APPLY);
7070
me = new MergeEntries(one, two, Localization.lang("Old entry"),
71-
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
71+
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
7272
break;
7373
case DUPLICATE_SEARCH_WITH_EXACT:
7474
first = new ButtonType(Localization.lang("Keep left"), ButtonData.APPLY);
@@ -84,7 +84,7 @@ private void init(BibEntry one, BibEntry two, DuplicateResolverType type) {
8484
second = new ButtonType(Localization.lang("Do not import entry"), ButtonData.APPLY);
8585
both = new ButtonType(Localization.lang("Import and keep old entry"), ButtonData.APPLY);
8686
me = new MergeEntries(one, two, Localization.lang("Old entry"),
87-
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
87+
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
8888
break;
8989
}
9090
if (removeExactVisible) {

src/main/java/org/jabref/gui/DuplicateSearch.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private void askResolveStrategy(DuplicateSearchResult result, BibEntry first, Bi
127127
DuplicateResolverResult resolverResult = dialog.showAndWait().orElse(DuplicateResolverResult.BREAK);
128128

129129
if ((resolverResult == DuplicateResolverResult.KEEP_LEFT)
130-
|| (resolverResult == DuplicateResolverResult.AUTOREMOVE_EXACT)) {
130+
|| (resolverResult == DuplicateResolverResult.AUTOREMOVE_EXACT)) {
131131
result.remove(second);
132132
if (resolverResult == DuplicateResolverResult.AUTOREMOVE_EXACT) {
133133
autoRemoveExactDuplicates.set(true); // Remember choice
@@ -167,7 +167,7 @@ private void handleDuplicates(DuplicateSearchResult result) {
167167
}
168168

169169
dialogService.notify(Localization.lang("Duplicates found") + ": " + duplicateCount.get() + ' '
170-
+ Localization.lang("pairs processed") + ": " + result.getDuplicateCount());
170+
+ Localization.lang("pairs processed") + ": " + result.getDuplicateCount());
171171
compoundEdit.end();
172172
panel.getUndoManager().addEdit(compoundEdit);
173173

src/main/java/org/jabref/gui/EntryType.fxml

+39-37
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,43 @@
1212
<?import javafx.scene.layout.GridPane?>
1313
<?import javafx.scene.layout.RowConstraints?>
1414
<?import javafx.scene.layout.VBox?>
15-
16-
<DialogPane prefWidth="476.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.EntryTypeView">
17-
<buttonTypes>
18-
<ButtonType fx:constant="CANCEL" />
19-
<ButtonType fx:id="generateButton" buttonData="OK_DONE" text="%Generate" />
20-
</buttonTypes>
15+
<DialogPane xmlns:fx="http://javafx.com/fxml/1" prefWidth="476.0" xmlns="http://javafx.com/javafx/8.0.171"
16+
fx:controller="org.jabref.gui.EntryTypeView">
17+
<buttonTypes>
18+
<ButtonType fx:constant="CANCEL"/>
19+
<ButtonType fx:id="generateButton" buttonData="OK_DONE" text="%Generate"/>
20+
</buttonTypes>
2121
<content>
22-
<VBox prefHeight="200.0" prefWidth="400.0">
23-
<children>
24-
<TitledPane fx:id="biblatexTitlePane" animated="false" collapsible="false" text="Biblatex">
25-
<content>
26-
<FlowPane fx:id="biblatexPane" prefHeight="200.0" prefWidth="200.0" />
27-
</content>
28-
</TitledPane>
29-
<TitledPane fx:id="bibTexTitlePane" animated="false" collapsible="false" text="BibTeX">
30-
<content>
31-
<FlowPane fx:id="bibTexPane" prefHeight="200.0" prefWidth="200.0" />
32-
</content>
33-
</TitledPane>
34-
<TitledPane fx:id="ieeeTranTitlePane" animated="false" collapsible="false" text="IEEETran">
35-
<content>
36-
<FlowPane fx:id="ieeetranPane" prefHeight="200.0" prefWidth="200.0" />
37-
</content>
38-
</TitledPane>
39-
<TitledPane fx:id="customTitlePane" animated="false" collapsible="false" text="%Custom">
40-
<content>
41-
<FlowPane fx:id="customPane" prefHeight="200.0" prefWidth="200.0" />
42-
</content>
43-
</TitledPane>
44-
<GridPane alignment="CENTER">
22+
<VBox prefHeight="200.0" prefWidth="400.0">
23+
<children>
24+
<TitledPane fx:id="biblatexTitlePane" animated="false" collapsible="false" text="Biblatex">
25+
<content>
26+
<FlowPane fx:id="biblatexPane" prefHeight="200.0" prefWidth="200.0"/>
27+
</content>
28+
</TitledPane>
29+
<TitledPane fx:id="bibTexTitlePane" animated="false" collapsible="false" text="BibTeX">
30+
<content>
31+
<FlowPane fx:id="bibTexPane" prefHeight="200.0" prefWidth="200.0"/>
32+
</content>
33+
</TitledPane>
34+
<TitledPane fx:id="ieeeTranTitlePane" animated="false" collapsible="false" text="IEEETran">
35+
<content>
36+
<FlowPane fx:id="ieeetranPane" prefHeight="200.0" prefWidth="200.0"/>
37+
</content>
38+
</TitledPane>
39+
<TitledPane fx:id="customTitlePane" animated="false" collapsible="false" text="%Custom">
40+
<content>
41+
<FlowPane fx:id="customPane" prefHeight="200.0" prefWidth="200.0"/>
42+
</content>
43+
</TitledPane>
44+
<GridPane alignment="CENTER">
4545
<children>
46-
<Label text="%ID type"/>
47-
<ComboBox fx:id="idBasedFetchers" onAction="#focusTextField" prefHeight="30.0" prefWidth="300.0" GridPane.columnIndex="1" />
48-
<Label text="%ID" GridPane.rowIndex="1" />
49-
<TextField fx:id="idTextField" onAction="#runFetcherWorker" prefHeight="30.0" prefWidth="300.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
46+
<Label text="%ID type"/>
47+
<ComboBox fx:id="idBasedFetchers" onAction="#focusTextField" prefHeight="30.0" prefWidth="300.0"
48+
GridPane.columnIndex="1"/>
49+
<Label text="%ID" GridPane.rowIndex="1" />
50+
<TextField fx:id="idTextField" onAction="#runFetcherWorker" prefHeight="30.0" prefWidth="300.0"
51+
GridPane.columnIndex="1" GridPane.rowIndex="1"/>
5052
</children>
5153
<columnConstraints>
5254
<ColumnConstraints hgrow="SOMETIMES" maxWidth="122.0" minWidth="10.0" prefWidth="100.0" />
@@ -56,11 +58,11 @@
5658
<Insets bottom="4.0" left="4.0" right="4.0" top="4.0" />
5759
</opaqueInsets>
5860
<rowConstraints>
59-
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
60-
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
61+
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES"/>
62+
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES"/>
6163
</rowConstraints>
6264
</GridPane>
63-
</children>
64-
</VBox>
65+
</children>
66+
</VBox>
6567
</content>
6668
</DialogPane>

src/main/java/org/jabref/gui/PreviewPanel.java

+8-13
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import javafx.scene.web.WebView;
2525

2626
import org.jabref.Globals;
27-
import org.jabref.gui.externalfiles.NewDroppedFileHandler;
27+
import org.jabref.gui.externalfiles.ExternalFilesEntryLinker;
2828
import org.jabref.gui.externalfiletype.ExternalFileTypes;
2929
import org.jabref.gui.icon.IconTheme;
3030
import org.jabref.gui.keyboard.KeyBinding;
@@ -61,9 +61,9 @@ public class PreviewPanel extends ScrollPane implements SearchQueryHighlightList
6161
private final DialogService dialogService;
6262
private final KeyBindingRepository keyBindingRepository;
6363

64+
private final String defaultPreviewStyle = "Preview";
6465
private String previewStyle;
6566
private CitationStyle citationStyle;
66-
private final String defaultPreviewStyle = "Preview";
6767
private Optional<BasePanel> basePanel = Optional.empty();
6868

6969
private boolean fixedLayout;
@@ -80,7 +80,7 @@ public class PreviewPanel extends ScrollPane implements SearchQueryHighlightList
8080
private final WebView previewView;
8181
private Optional<Future<?>> citationStyleFuture = Optional.empty();
8282

83-
private final NewDroppedFileHandler fileHandler;
83+
private final ExternalFilesEntryLinker fileLinker;
8484

8585
/**
8686
* @param panel (may be null) Only set this if the preview is associated to the main window.
@@ -93,11 +93,7 @@ public PreviewPanel(BasePanel panel, BibDatabaseContext databaseContext, KeyBind
9393
this.clipBoardManager = Globals.clipboardManager;
9494
this.keyBindingRepository = keyBindingRepository;
9595

96-
fileHandler = new NewDroppedFileHandler(dialogService, databaseContext, externalFileTypes,
97-
Globals.prefs.getFilePreferences(),
98-
Globals.prefs.getImportFormatPreferences(),
99-
Globals.prefs.getUpdateFieldPreferences(),
100-
Globals.getFileUpdateMonitor());
96+
fileLinker = new ExternalFilesEntryLinker(externalFileTypes, Globals.prefs.getFilePreferences(), databaseContext);
10197

10298
// Set up scroll pane for preview pane
10399
setFitToHeight(true);
@@ -135,19 +131,18 @@ public PreviewPanel(BasePanel panel, BibDatabaseContext databaseContext, KeyBind
135131
List<Path> files = event.getDragboard().getFiles().stream().map(File::toPath).collect(Collectors.toList());
136132

137133
if (event.getTransferMode() == TransferMode.MOVE) {
138-
139134
LOGGER.debug("Mode MOVE"); //shift on win or no modifier
140-
fileHandler.addToEntryRenameAndMoveToFileDir(entry, files);
135+
fileLinker.moveFilesToFileDirAndAddToEntry(entry, files);
141136
}
142137
if (event.getTransferMode() == TransferMode.LINK) {
143138
LOGGER.debug("Node LINK"); //alt on win
144-
fileHandler.addToEntry(entry, files);
145-
139+
fileLinker.addFilesToEntry(entry, files);
146140
}
147141
if (event.getTransferMode() == TransferMode.COPY) {
148142
LOGGER.debug("Mode Copy"); //ctrl on win, no modifier on Xubuntu
149-
fileHandler.copyFilesToFileDirAndAddToEntry(entry, files);
143+
fileLinker.copyFilesToFileDirAndAddToEntry(entry, files);
150144
}
145+
success = true;
151146
}
152147

153148
event.setDropCompleted(success);

src/main/java/org/jabref/gui/SidePaneManager.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ public SidePaneManager(JabRefPreferences preferences, JabRefFrame frame) {
3131

3232
OpenOfficePreferences openOfficePreferences = preferences.getOpenOfficePreferences();
3333
Stream.of(
34-
new FileUpdatePanel(this),
35-
new GroupSidePane(this, preferences, frame.getDialogService()),
36-
new WebSearchPane(this, preferences, frame),
37-
new OpenOfficeSidePanel(this, preferences, frame))
34+
new FileUpdatePanel(this),
35+
new GroupSidePane(this, preferences, frame.getDialogService()),
36+
new WebSearchPane(this, preferences, frame),
37+
new OpenOfficeSidePanel(this, preferences, frame))
3838
.forEach(pane -> components.put(pane.getType(), pane));
3939

4040
if (preferences.getBoolean(JabRefPreferences.GROUP_SIDEPANE_VISIBLE)) {

src/main/java/org/jabref/gui/bibtexkeypattern/ResolveDuplicateLabelDialog.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public ResolveDuplicateLabelDialog(BasePanel panel, String key, List<BibEntry> e
4848
diag = new JDialog((JFrame) null, Localization.lang("Duplicate BibTeX key"), true);
4949

5050
FormBuilder b = FormBuilder.create().layout(new FormLayout(
51-
"left:pref, 4dlu, fill:pref", "p"));
51+
"left:pref, 4dlu, fill:pref", "p"));
5252
b.add(new JLabel(Localization.lang("Duplicate BibTeX key") + ": " + key)).xyw(1, 1, 3);
5353
b.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
5454

src/main/java/org/jabref/gui/copyfiles/CopyFilesTask.java

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ protected List<CopyFilesResultItemViewModel> call() throws InterruptedException,
112112
writeLogMessage(newFile, bw, localizedErrorMessage);
113113
addResultToList(newFile, success, localizedErrorMessage);
114114
}
115-
116115
}
117116

118117
}

0 commit comments

Comments
 (0)