Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sharelatex
Browse files Browse the repository at this point in the history
* upstream/master: (47 commits)
  Fix Google Scholar fetcher
  Use english for all LCID mappings #1851
  remove import preferences test mock import and convert to junit5
  fix #3693 (#3702)
  Fix space leads to jump in entry editor (#3699)
  Fix #3669
  Extract creation of the contents of FileAnnotationTabController
  Fix changelog
  Fix NPE
  Remove unnecessary file
  use processbuilder for calling external apps
  Fix color highlight of odd linked files
  Fixes #2964
  Fix koppor issues #3
  Allow spaces in DOIs
  Remove irrelevant log messages during XMP reading
  Adapt log4j configuration for cleaner junit tests #3511
  Eclipse Django style #3655
  Better code style for chained methods
  Update build.gradle
  ...
  • Loading branch information
Siedlerchr committed Feb 7, 2018
2 parents dfe262d + 5e96d46 commit ada867a
Show file tree
Hide file tree
Showing 32 changed files with 513 additions and 346 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
## [Unreleased]

### Changed
- Reorganised annotation information on the right side of the "File annotations" tab. [#3109](https://github.com/JabRef/jabref/issues/3109)
- We now show a small notification icon in the entry editor when we detect data inconsistency or other problems. [#3145](https://github.com/JabRef/jabref/issues/3145)
- We added [oaDOI](https://oadoi.org/) as a fulltext provider, so that JabRef is now able to provide fulltexts for more than 90 million open-access articles.
- We changed one default of [Cleanup entries dialog](http://help.jabref.org/en/CleanupEntries): Per default, the PDF are not moved to the default file directory anymore. [#3619](https://github.com/JabRef/jabref/issues/3619)
- We added a new type of group that shows all items referenced in a given LaTeX file (actually the generated AUX file). [#1664](https://github.com/JabRef/jabref/issues/1664)
- We added the export of the `translator` field to the according MS-Office XML field. [#1750, comment](https://github.com/JabRef/jabref/issues/1750#issuecomment-357350986)
- We changed the import of the MS-Office XML fields `bookauthor` and `translator`. Both are now imported to their corresponding bibtex/biblatex fields.
- We improved the export of the `address` and `location` field to the MS-Office XML fields. If the address field does not contain a comma, it is treated as single value and exported to the field `city`. [#1750, comment](https://github.com/JabRef/jabref/issues/1750#issuecomment-357539167)
- We improved the export of the `address` and `location` field to the MS-Office XML fields. If the address field does not contain a comma, it is treated as single value and exported to the field `city`. [#1750, comment](https://github.com/JabRef/jabref/issues/1750#issuecomment-357539167)
For more details refer to the [field mapping help page](http://help.jabref.org/en/MsOfficeBibFieldMapping)
- We added Facebook and Twitter icons in the toolbar to link to our [Facebook](https://www.facebook.com/JabRef/) and [Twitter](https://twitter.com/jabref_org) pages.
- We no longer print empty lines when exporting an entry in RIS format [#3634](https://github.com/JabRef/jabref/issues/3634)
Expand All @@ -27,8 +28,10 @@ For more details refer to the [field mapping help page](http://help.jabref.org/e
The new default removes the linked file from the entry instead of deleting the file from disk. [#3679](https://github.com/JabRef/jabref/issues/3679)

### Fixed
- We fixed an issue where pressing space caused the cursor to jump to the start of the text field. [#3471](https://github.com/JabRef/jabref/issues/3471)
- We fixed the missing dot in the name of an exported file. [#3576](https://github.com/JabRef/jabref/issues/3576)
- Autocompletion in the search bar can now be disabled via the preferences. [#3598](https://github.com/JabRef/jabref/issues/3598)
- We fixed an issue where odd linked files could not be selected in the entry editor. [#3639](https://github.com/JabRef/jabref/issues/3639)
- We fixed and extended the RIS import functionality to cover more fields. [#3634](https://github.com/JabRef/jabref/issues/3634) [#2607](https://github.com/JabRef/jabref/issues/2607)
- Chaining modifiers in BibTeX key pattern now works as described in the documentation. [#3648](https://github.com/JabRef/jabref/issues/3648)
- We fixed an issue where not all bibtex/biblatex fields would be exported as latex-free to MS-Office XML [koppor#284](https://github.com/koppor/jabref/issues/284)
Expand Down
16 changes: 14 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:8.8'
}

jacoco {
toolVersion = '0.8.0'
}

dependencyUpdates {
outputFormatter = "json"
}
Expand Down Expand Up @@ -234,7 +238,16 @@ dependencyUpdates.resolutionStrategy = {
selection.reject("http://dev.mysql.com/downloads/connector/j/ lists the version 5.* as last stable version.")
}
}

withModule("org.jacoco.agent") { ComponentSelection selection ->
if (selection.candidate.version.equals("0.8.0")) {
selection.reject("As a native plugin we cannot control the actual version of jacoco. This dependency should be hidden.")
}
}
withModule("org.jacoco.ant") { ComponentSelection selection ->
if (selection.candidate.version.equals("0.8.0")) {
selection.reject("As a native plugin we cannot control the actual version of jacoco. This dependency should be hidden.")
}
}
}
}

Expand Down Expand Up @@ -398,7 +411,6 @@ afterEvaluate {
def junitPlatformTest = tasks.junitPlatformTest

jacoco {
toolVersion = '0.8.0'
applyTo(junitPlatformTest)
}

Expand Down
1 change: 1 addition & 0 deletions config/IntelliJ Code Style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
<arrangement>
<rules>
<section>
Expand Down
2 changes: 1 addition & 1 deletion eclipse.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ tasks.eclipse.doFirst {
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=88
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/jabref/gui/EntryTypeDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ protected Optional<BibEntry> doInBackground() throws Exception {
generateButton.setText(Localization.lang("Searching..."));
});
searchID = idTextField.getText().trim();
searchID = searchID.replaceAll(" ", "");
fetcher = WebFetchers.getIdBasedFetchers(Globals.prefs.getImportFormatPreferences()).get(comboBox.getSelectedIndex());
if (!searchID.isEmpty()) {
try {
Expand Down
36 changes: 30 additions & 6 deletions src/main/java/org/jabref/gui/entryeditor/EntryEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-fx-hgap: 10;
-fx-vgap: 6;
-fx-background-color: -fx-light-background;
-fx-padding: 5 5 0 15;
-fx-padding: 5 5 5 15;
}

.date-picker > .date-picker-display-node {
Expand All @@ -23,17 +23,41 @@
-fx-text-origin: bottom;
}

.label > *.text {
-fx-translate-y: 0;
}

.combo-box > *.text {
-fx-text-fill: text-area-foreground;
-fx-text-origin: baseline;
}

.list-cell:odd {
-fx-background-color: text-area-background;
-fx-background: text-area-background;
}

/* Selected rows */
.list-view:focused > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected,
.tree-view:focused > .virtual-flow > .clipped-container > .sheet > .tree-cell:filled:selected,
.table-view:focused > .virtual-flow > .clipped-container > .sheet > .table-row-cell:filled:selected,
.tree-table-view:focused > .virtual-flow > .clipped-container > .sheet > .tree-table-row-cell:filled:selected,
.table-view:focused > .virtual-flow > .clipped-container > .sheet > .table-row-cell .table-cell:selected,
.tree-table-view:focused > .virtual-flow > .clipped-container > .sheet > .tree-table-row-cell .tree-table-cell:selected {
-fx-background: -fx-selection-bar;
}
/* Selected when control is not focused */
.list-cell:filled:selected,
.tree-cell:filled:selected,
.table-row-cell:filled:selected,
.tree-table-row-cell:filled:selected,
.table-row-cell:filled > .table-cell:selected,
.tree-table-row-cell:filled > .tree-table-cell:selected {
-fx-background: -fx-selection-bar-non-focused;
}
/* focused cell (keyboard navigation) */
.list-view:focused > .virtual-flow > .clipped-container > .sheet > .list-cell:focused,
.tree-view:focused > .virtual-flow > .clipped-container > .sheet > .tree-cell:focused,
.table-view:focused:row-selection > .virtual-flow > .clipped-container > .sheet > .table-row-cell:focused,
.tree-table-view:focused:row-selection > .virtual-flow > .clipped-container > .sheet > .tree-table-row-cell:focused,
.table-view:focused:cell-selection > .virtual-flow > .clipped-container > .sheet > .table-row-cell > .table-cell:focused,
.tree-table-view:focused:cell-selection > .virtual-flow > .clipped-container > .sheet > .tree-table-row-cell > .tree-table-cell:focused {
-fx-background: -fx-selection-bar;
}

#typeLabel {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/entryeditor/SourceTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected void bindToEntry(BibEntry entry) {
// Store source for every change in the source code
// and update source code for every change of entry field values
BindingsHelper.bindContentBidirectional(entry.getFieldsObservable(), codeArea.textProperty(), this::storeSource, fields -> {
DefaultTaskExecutor.runInJavaFXThread(() -> {
DefaultTaskExecutor.runAndWaitInJavaFXThread(() -> {
codeArea.clear();
try {
codeArea.appendText(getSourceString(entry, mode, fieldFormatterPreferences));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
Expand All @@ -16,67 +17,67 @@
<?import javafx.scene.layout.RowConstraints?>
<?import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView?>
<?import org.controlsfx.control.MasterDetailPane?>
<ScrollPane xmlns:fx="http://javafx.com/fxml/1" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER"
styleClass="fileAnnotationTab" xmlns="http://javafx.com/javafx/8.0.112"
fx:controller="org.jabref.gui.entryeditor.fileannotationtab.FileAnnotationTabController">

<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" styleClass="fileAnnotationTab" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.entryeditor.fileannotationtab.FileAnnotationTabController">
<MasterDetailPane dividerPosition="0.6">
<masterNode>
<BorderPane>
<padding>
<Insets top="5" right="5" bottom="5" left="5"/>
<Insets bottom="5" left="5" right="5" top="5" />
</padding>
<top>
<HBox alignment="BASELINE_LEFT">
<Label text="%Filename" prefWidth="70.0" alignment="BASELINE_LEFT"/>
<ComboBox fx:id="files" maxWidth="Infinity" HBox.hgrow="ALWAYS"/>
<Label alignment="BASELINE_LEFT" prefWidth="70.0" text="%Filename" />
<ComboBox fx:id="files" maxWidth="Infinity" HBox.hgrow="ALWAYS" />
</HBox>
</top>
<center>
<ListView fx:id="annotationList"/>
<ListView fx:id="annotationList" />
</center>
</BorderPane>
</masterNode>
<detailNode>
<GridPane>
<GridPane fx:id="grid">
<padding>
<Insets top="5" right="5" bottom="5" left="10"/>
<Insets bottom="5" left="10" right="5" top="5" />
</padding>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="60.0" prefWidth="70.0"/>
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0"/>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="20.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="10.0" prefWidth="10.0" />
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="40.0" prefWidth="40.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" valignment="TOP"/>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" prefHeight="100.0" vgrow="ALWAYS"/>
<RowConstraints minHeight="10.0" prefHeight="100.0" vgrow="ALWAYS"/>
<RowConstraints maxHeight="-Infinity" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="100.0" vgrow="ALWAYS" />
<RowConstraints maxHeight="-Infinity" minHeight="20.0" prefHeight="40.0" vgrow="ALWAYS" />
<RowConstraints />
<RowConstraints maxHeight="-Infinity" minHeight="10.0" prefHeight="10.0" />
</rowConstraints>
<Label text="%Author" minHeight="35.0" prefHeight="30.0" GridPane.columnIndex="0" GridPane.rowIndex="1"
alignment="TOP_LEFT"/>
<HBox GridPane.columnIndex="1" GridPane.rowIndex="1">
<Label fx:id="author"/>
<Pane HBox.hgrow="ALWAYS"/>
<Label text="%Marking" GridPane.columnIndex="1" GridPane.valignment="BOTTOM">
<padding>
<Insets bottom="3.0" />
</padding></Label>
<TextArea fx:id="marking" editable="false" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="%Content" GridPane.columnIndex="1" GridPane.rowIndex="2" GridPane.valignment="BOTTOM">
<padding>
<Insets bottom="5.0" />
</padding></Label>
<TextArea fx:id="content" editable="false" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<HBox GridPane.columnIndex="2" GridPane.rowIndex="1">
<Label fx:id="author" />
<Pane HBox.hgrow="ALWAYS" />
<Button onAction="#copy" styleClass="flatButton">
<graphic>
<MaterialDesignIconView glyphName="CONTENT_COPY"/>
<MaterialDesignIconView glyphName="CONTENT_COPY">
<cursor>
<Cursor fx:constant="HAND" />
</cursor></MaterialDesignIconView>
</graphic>
<tooltip>
<Tooltip text="%Copy to clipboard"/>
<Tooltip text="%Copy to clipboard" />
</tooltip>
</Button>
</HBox>
<Label text="%Page" GridPane.columnIndex="0" GridPane.rowIndex="2"/>
<Label fx:id="page" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<Label text="%Date" GridPane.columnIndex="0" GridPane.rowIndex="3"/>
<Label fx:id="date" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<Label text="%Content" GridPane.columnIndex="0" GridPane.rowIndex="4"/>
<TextArea fx:id="content" GridPane.columnIndex="1" GridPane.rowIndex="4" editable="false"
wrapText="true"/>
<Label text="%Marking" GridPane.columnIndex="0" GridPane.rowIndex="5"/>
<TextArea fx:id="marking" GridPane.columnIndex="1" GridPane.rowIndex="5" editable="false"
wrapText="true"/>
</GridPane>
</detailNode>
</MasterDetailPane>
Expand Down
Loading

0 comments on commit ada867a

Please sign in to comment.