Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into editStringsjavafx
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Siedlerchr committed Feb 15, 2019
2 parents 30d5bf1 + d95c06b commit 634bed4
Show file tree
Hide file tree
Showing 120 changed files with 1,066 additions and 3,001 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We updated updated the Related Articles tab to accept JSON from the new version of the Mr. DLib service
- 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)
- 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)
- For automatically created groups, added ability to filter groups by entry type. [#4539](https://github.com/JabRef/jabref/issues/4539)
- We added the ability to add field names from the Preferences Dialog [#4546](https://github.com/JabRef/jabref/issues/4546)
- We added the ability change the column widths directly in the main table. [#4546](https://github.com/JabRef/jabref/issues/4546)
- 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)
Expand Down
30 changes: 12 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ dependencies {
compile group: 'org.apache.tika', name: 'tika-core', version: '1.20'

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

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

Expand Down Expand Up @@ -147,32 +147,29 @@ dependencies {

// >1.8.0-beta is required for java 9 compatibility
compile 'org.slf4j:slf4j-api:1.8.0-beta2'
compile 'org.apache.logging.log4j:log4j-slf4j18-impl:2.11.1'
compile 'org.apache.logging.log4j:log4j-jcl:2.11.1'
compile 'org.apache.logging.log4j:log4j-api:2.11.1'
compile 'org.apache.logging.log4j:log4j-core:2.11.1'
compile 'org.apache.logging.log4j:log4j-slf4j18-impl:2.11.2'
compile 'org.apache.logging.log4j:log4j-jcl:2.11.2'
compile 'org.apache.logging.log4j:log4j-api:2.11.2'
compile 'org.apache.logging.log4j:log4j-core:2.11.2'

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

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

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

compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.3.0'
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.3.0'
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-api:5.3.2'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.3.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.3.2'
testCompile 'org.junit.platform:junit-platform-launcher:1.3.2'
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'

testCompile 'org.junit-pioneer:junit-pioneer:0.3.0'
testRuntime 'org.apache.logging.log4j:log4j-core:2.11.1'
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.1'
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.2'
testCompile 'org.mockito:mockito-core:2.24.0'
testCompile 'com.github.tomakehurst:wiremock:2.21.0'
testCompile 'org.assertj:assertj-swing-junit:3.8.0'
testCompile 'org.assertj:assertj-swing-junit:3.9.2'
testCompile 'org.reflections:reflections:0.9.11'
testCompile 'org.xmlunit:xmlunit-core:2.6.2'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.2'
Expand All @@ -192,9 +189,6 @@ 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 { rules ->
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/DuplicateResolverDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void init(BibEntry one, BibEntry two, DuplicateResolverType type) {
second = new ButtonType(Localization.lang("Remove entry from import"), ButtonData.APPLY);
both = new ButtonType(Localization.lang("Keep both"), ButtonData.APPLY);
me = new MergeEntries(one, two, Localization.lang("Old entry"),
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
break;
case DUPLICATE_SEARCH_WITH_EXACT:
first = new ButtonType(Localization.lang("Keep left"), ButtonData.APPLY);
Expand All @@ -84,7 +84,7 @@ private void init(BibEntry one, BibEntry two, DuplicateResolverType type) {
second = new ButtonType(Localization.lang("Do not import entry"), ButtonData.APPLY);
both = new ButtonType(Localization.lang("Import and keep old entry"), ButtonData.APPLY);
me = new MergeEntries(one, two, Localization.lang("Old entry"),
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
Localization.lang("From import"), frame.getCurrentBasePanel().getBibDatabaseContext().getMode());
break;
}
if (removeExactVisible) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/DuplicateSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void askResolveStrategy(DuplicateSearchResult result, BibEntry first, Bi
DuplicateResolverResult resolverResult = dialog.showAndWait().orElse(DuplicateResolverResult.BREAK);

if ((resolverResult == DuplicateResolverResult.KEEP_LEFT)
|| (resolverResult == DuplicateResolverResult.AUTOREMOVE_EXACT)) {
|| (resolverResult == DuplicateResolverResult.AUTOREMOVE_EXACT)) {
result.remove(second);
if (resolverResult == DuplicateResolverResult.AUTOREMOVE_EXACT) {
autoRemoveExactDuplicates.set(true); // Remember choice
Expand Down Expand Up @@ -167,7 +167,7 @@ private void handleDuplicates(DuplicateSearchResult result) {
}

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

Expand Down
76 changes: 39 additions & 37 deletions src/main/java/org/jabref/gui/EntryType.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,43 @@
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<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">
<buttonTypes>
<ButtonType fx:constant="CANCEL" />
<ButtonType fx:id="generateButton" buttonData="OK_DONE" text="%Generate" />
</buttonTypes>
<DialogPane xmlns:fx="http://javafx.com/fxml/1" prefWidth="476.0" xmlns="http://javafx.com/javafx/8.0.171"
fx:controller="org.jabref.gui.EntryTypeView">
<buttonTypes>
<ButtonType fx:constant="CANCEL"/>
<ButtonType fx:id="generateButton" buttonData="OK_DONE" text="%Generate"/>
</buttonTypes>
<content>
<VBox prefHeight="200.0" prefWidth="400.0">
<children>
<TitledPane fx:id="biblatexTitlePane" animated="false" collapsible="false" text="Biblatex">
<content>
<FlowPane fx:id="biblatexPane" prefHeight="200.0" prefWidth="200.0" />
</content>
</TitledPane>
<TitledPane fx:id="bibTexTitlePane" animated="false" collapsible="false" text="BibTeX">
<content>
<FlowPane fx:id="bibTexPane" prefHeight="200.0" prefWidth="200.0" />
</content>
</TitledPane>
<TitledPane fx:id="ieeeTranTitlePane" animated="false" collapsible="false" text="IEEETran">
<content>
<FlowPane fx:id="ieeetranPane" prefHeight="200.0" prefWidth="200.0" />
</content>
</TitledPane>
<TitledPane fx:id="customTitlePane" animated="false" collapsible="false" text="%Custom">
<content>
<FlowPane fx:id="customPane" prefHeight="200.0" prefWidth="200.0" />
</content>
</TitledPane>
<GridPane alignment="CENTER">
<VBox prefHeight="200.0" prefWidth="400.0">
<children>
<TitledPane fx:id="biblatexTitlePane" animated="false" collapsible="false" text="Biblatex">
<content>
<FlowPane fx:id="biblatexPane" prefHeight="200.0" prefWidth="200.0"/>
</content>
</TitledPane>
<TitledPane fx:id="bibTexTitlePane" animated="false" collapsible="false" text="BibTeX">
<content>
<FlowPane fx:id="bibTexPane" prefHeight="200.0" prefWidth="200.0"/>
</content>
</TitledPane>
<TitledPane fx:id="ieeeTranTitlePane" animated="false" collapsible="false" text="IEEETran">
<content>
<FlowPane fx:id="ieeetranPane" prefHeight="200.0" prefWidth="200.0"/>
</content>
</TitledPane>
<TitledPane fx:id="customTitlePane" animated="false" collapsible="false" text="%Custom">
<content>
<FlowPane fx:id="customPane" prefHeight="200.0" prefWidth="200.0"/>
</content>
</TitledPane>
<GridPane alignment="CENTER">
<children>
<Label text="%ID type"/>
<ComboBox fx:id="idBasedFetchers" onAction="#focusTextField" prefHeight="30.0" prefWidth="300.0" GridPane.columnIndex="1" />
<Label text="%ID" GridPane.rowIndex="1" />
<TextField fx:id="idTextField" onAction="#runFetcherWorker" prefHeight="30.0" prefWidth="300.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="%ID type"/>
<ComboBox fx:id="idBasedFetchers" onAction="#focusTextField" prefHeight="30.0" prefWidth="300.0"
GridPane.columnIndex="1"/>
<Label text="%ID" GridPane.rowIndex="1" />
<TextField fx:id="idTextField" onAction="#runFetcherWorker" prefHeight="30.0" prefWidth="300.0"
GridPane.columnIndex="1" GridPane.rowIndex="1"/>
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="122.0" minWidth="10.0" prefWidth="100.0" />
Expand All @@ -56,11 +58,11 @@
<Insets bottom="4.0" left="4.0" right="4.0" top="4.0" />
</opaqueInsets>
<rowConstraints>
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints>
</GridPane>
</children>
</VBox>
</children>
</VBox>
</content>
</DialogPane>
21 changes: 8 additions & 13 deletions src/main/java/org/jabref/gui/PreviewPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import javafx.scene.web.WebView;

import org.jabref.Globals;
import org.jabref.gui.externalfiles.NewDroppedFileHandler;
import org.jabref.gui.externalfiles.ExternalFilesEntryLinker;
import org.jabref.gui.externalfiletype.ExternalFileTypes;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.keyboard.KeyBinding;
Expand Down Expand Up @@ -61,9 +61,9 @@ public class PreviewPanel extends ScrollPane implements SearchQueryHighlightList
private final DialogService dialogService;
private final KeyBindingRepository keyBindingRepository;

private final String defaultPreviewStyle = "Preview";
private String previewStyle;
private CitationStyle citationStyle;
private final String defaultPreviewStyle = "Preview";
private Optional<BasePanel> basePanel = Optional.empty();

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

private final NewDroppedFileHandler fileHandler;
private final ExternalFilesEntryLinker fileLinker;

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

fileHandler = new NewDroppedFileHandler(dialogService, databaseContext, externalFileTypes,
Globals.prefs.getFilePreferences(),
Globals.prefs.getImportFormatPreferences(),
Globals.prefs.getUpdateFieldPreferences(),
Globals.getFileUpdateMonitor());
fileLinker = new ExternalFilesEntryLinker(externalFileTypes, Globals.prefs.getFilePreferences(), databaseContext);

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

if (event.getTransferMode() == TransferMode.MOVE) {

LOGGER.debug("Mode MOVE"); //shift on win or no modifier
fileHandler.addToEntryRenameAndMoveToFileDir(entry, files);
fileLinker.moveFilesToFileDirAndAddToEntry(entry, files);
}
if (event.getTransferMode() == TransferMode.LINK) {
LOGGER.debug("Node LINK"); //alt on win
fileHandler.addToEntry(entry, files);

fileLinker.addFilesToEntry(entry, files);
}
if (event.getTransferMode() == TransferMode.COPY) {
LOGGER.debug("Mode Copy"); //ctrl on win, no modifier on Xubuntu
fileHandler.copyFilesToFileDirAndAddToEntry(entry, files);
fileLinker.copyFilesToFileDirAndAddToEntry(entry, files);
}
success = true;
}

event.setDropCompleted(success);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jabref/gui/SidePaneManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public SidePaneManager(JabRefPreferences preferences, JabRefFrame frame) {

OpenOfficePreferences openOfficePreferences = preferences.getOpenOfficePreferences();
Stream.of(
new FileUpdatePanel(this),
new GroupSidePane(this, preferences, frame.getDialogService()),
new WebSearchPane(this, preferences, frame),
new OpenOfficeSidePanel(this, preferences, frame))
new FileUpdatePanel(this),
new GroupSidePane(this, preferences, frame.getDialogService()),
new WebSearchPane(this, preferences, frame),
new OpenOfficeSidePanel(this, preferences, frame))
.forEach(pane -> components.put(pane.getType(), pane));

if (preferences.getBoolean(JabRefPreferences.GROUP_SIDEPANE_VISIBLE)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ResolveDuplicateLabelDialog(BasePanel panel, String key, List<BibEntry> e
diag = new JDialog((JFrame) null, Localization.lang("Duplicate BibTeX key"), true);

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

Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/gui/copyfiles/CopyFilesTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ protected List<CopyFilesResultItemViewModel> call() throws InterruptedException,
writeLogMessage(newFile, bw, localizedErrorMessage);
addResultToList(newFile, success, localizedErrorMessage);
}

}

}
Expand Down
Loading

0 comments on commit 634bed4

Please sign in to comment.