Skip to content

Commit 2473e19

Browse files
committed
Merge branch 'master' of https://github.com/JabRef/jabref into improvePersonNamesChecker
2 parents b935ef2 + b0b5add commit 2473e19

28 files changed

+399
-243
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
2727
- The integrity check for person names now also tests that the names are specified in one of the standard BibTeX formats.
2828

2929
### Fixed
30+
- We fixed the adding of a new entry from DOI which led to a connection error. The DOI resolution now uses HTTPS to protect the user's privacy.[#2879](https://github.com/JabRef/jabref/issues/2897)
3031
- We fixed the IEEE Xplore web search functionality [#2789](https://github.com/JabRef/jabref/issues/2789)
3132
- We fixed an error in the CrossRef fetcher that occurred if one of the fetched entries had no title
3233
- We fixed an issue that prevented new entries to be automatically assigned to the currently selected group [#2783](https://github.com/JabRef/jabref/issues/2783).
33-
- We fixed a bug that only allowed parsing positive timezones from a FileAnnotation [#2839](https://github.com/JabRef/jabref/issues/22839)
34+
- We fixed a bug that only allowed parsing positive timezones from a FileAnnotation [#2839](https://github.com/JabRef/jabref/issues/2839)
3435
- We fixed a bug that did not allow the correct re-export of the MS-Office XML field `msbib-accessed` with a different date format [#2859](https://github.com/JabRef/jabref/issues/2859).
35-
36+
- We fixed some bugs that prevented the display of FileAnnotations that were created using the Foxit Reader. [#2839, comment](https://github.com/JabRef/jabref/issues/2839#issuecomment-302058227).
3637
### Removed
3738

3839

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Understanding the basics
22
We welcome contributions to JabRef and encourage to create a fork, clone, **create a new branch** (such as `fix-for-issue-121`), **work on the new branch — not master**, and create a pull request.
33
Be sure to create a **separate branch** for each improvement you implement.
4-
Take a look at GitHub's excellent [help documentation] for a detailed explanation.
4+
Take a look at GitHub's excellent [help documentation] for a detailed explanation and the explanation of [Feature Branch Workflow](https://de.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development.
55

66
We also have [code howtos](https://github.com/JabRef/jabref/wiki/Code-Howtos) and [guidelines for setting up a local workspace](https://github.com/JabRef/jabref/wiki/Guidelines-for-setting-up-a-local-workspace).
77

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ dependencies {
100100
compile 'org.antlr:antlr4-runtime:4.7'
101101

102102
// VersionEye states that 6.0.5 is the most recent version, but http://dev.mysql.com/downloads/connector/j/ shows that as "Development Release"
103-
compile 'mysql:mysql-connector-java:5.1.40'
103+
compile 'mysql:mysql-connector-java:5.1.42'
104104

105105
compile 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.7.1'
106106

@@ -125,7 +125,7 @@ dependencies {
125125

126126
compile 'org.jsoup:jsoup:1.10.2'
127127
compile 'com.mashape.unirest:unirest-java:1.4.9'
128-
compile 'info.debatty:java-string-similarity:0.23'
128+
compile 'info.debatty:java-string-similarity:0.24'
129129

130130
compile 'org.apache.logging.log4j:log4j-jcl:2.8.2'
131131
compile 'org.apache.logging.log4j:log4j-api:2.8.2'
@@ -290,7 +290,7 @@ tasks.withType(Test) {
290290
}
291291

292292
task jacocoMerge(type: JacocoMerge) {
293-
executionData test, fetcherTest, databaseTest
293+
executionData test, databaseTest
294294
}
295295

296296
jacocoTestReport {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.jabref.gui.keyboard.KeyBindingRepository;
77
import org.jabref.gui.util.TaskExecutor;
88
import org.jabref.logic.journals.JournalAbbreviationLoader;
9-
import org.jabref.preferences.JabRefPreferences;
9+
import org.jabref.preferences.PreferencesService;
1010

1111
import com.airhacks.afterburner.injection.Injector;
1212
import com.airhacks.afterburner.injection.PresenterFactory;
@@ -27,7 +27,7 @@ private static Object createDependency(Class<?> clazz) {
2727
return new FXDialogService();
2828
} else if (clazz == TaskExecutor.class) {
2929
return Globals.taskExecutor;
30-
} else if (clazz == JabRefPreferences.class) {
30+
} else if (clazz == PreferencesService.class) {
3131
return Globals.prefs;
3232
} else if (clazz == KeyBindingRepository.class) {
3333
return Globals.getKeyPrefs();

src/main/java/org/jabref/gui/entryeditor/EntryEditor.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
import org.jabref.gui.undo.UndoableFieldChange;
8181
import org.jabref.gui.undo.UndoableKeyChange;
8282
import org.jabref.gui.undo.UndoableRemoveEntry;
83-
import org.jabref.gui.util.DefaultTaskExecutor;
8483
import org.jabref.gui.util.component.CheckBoxMessage;
8584
import org.jabref.gui.util.component.VerticalLabelUI;
8685
import org.jabref.logic.TypedBibEntry;
@@ -239,8 +238,6 @@ public EntryEditor(JabRefFrame frame, BasePanel panel, BibEntry entry) {
239238
if (Globals.prefs.getBoolean(JabRefPreferences.DEFAULT_SHOW_SOURCE)) {
240239
tabbed.setSelectedIndex(sourceIndex);
241240
}
242-
243-
DefaultTaskExecutor.runInJavaFXThread(() -> setEntry(entry));
244241
}
245242

246243
private static String getSourceString(BibEntry entry, BibDatabaseMode type) throws IOException {
@@ -457,17 +454,6 @@ public BibEntry getEntry() {
457454
return entry;
458455
}
459456

460-
/**
461-
* Sets all the text areas according to the shown entry.
462-
*/
463-
private void setEntry(BibEntry entry) {
464-
for (Object tab : tabs) {
465-
if (tab instanceof EntryEditorTab) {
466-
((EntryEditorTab) tab).setEntry(entry);
467-
}
468-
}
469-
}
470-
471457
public BibDatabase getDatabase() {
472458
return panel.getDatabase();
473459
}

src/main/java/org/jabref/gui/entryeditor/EntryEditorTab.java

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import javax.swing.JComponent;
1616

1717
import javafx.embed.swing.JFXPanel;
18+
import javafx.geometry.VPos;
1819
import javafx.scene.Node;
1920
import javafx.scene.Parent;
2021
import javafx.scene.Scene;
@@ -55,7 +56,6 @@ class EntryEditorTab {
5556
private final BasePanel basePanel;
5657
private FieldEditorFX activeField;
5758
private BibEntry entry;
58-
private boolean updating;
5959

6060
public EntryEditorTab(JabRefFrame frame, BasePanel basePanel, List<String> fields, EntryEditor parent,
6161
boolean addKeyField, boolean compressed, String tabTitle, BibEntry entry) {
@@ -152,9 +152,9 @@ private Region setupPanel(JabRefFrame frame, BasePanel bPanel, boolean addKeyFie
152152
fieldEditor.setAutoCompleteListener(autoCompleteListener);
153153
*/
154154

155-
FieldEditorFX fieldEditor = FieldEditors.getForField(fieldName, Globals.taskExecutor, new FXDialogService(),
156-
Globals.journalAbbreviationLoader, Globals.prefs.getJournalAbbreviationPreferences(), Globals.prefs,
157-
bPanel.getBibDatabaseContext(), entry.getType());
155+
FieldEditorFX fieldEditor = FieldEditors.getForField(fieldName, Globals.taskExecutor, new FXDialogService(), Globals.journalAbbreviationLoader, Globals.prefs.getJournalAbbreviationPreferences(), Globals.prefs, bPanel.getBibDatabaseContext(), entry.getType());
156+
fieldEditor.bindToEntry(entry);
157+
158158
editors.put(fieldName, fieldEditor);
159159
/*
160160
// TODO: Reenable this
@@ -217,6 +217,7 @@ private Region setupPanel(JabRefFrame frame, BasePanel bPanel, boolean addKeyFie
217217

218218
RowConstraints rowExpand = new RowConstraints();
219219
rowExpand.setVgrow(Priority.ALWAYS);
220+
rowExpand.setValignment(VPos.TOP);
220221
if (rows == 0) {
221222
rowExpand.setPercentHeight(100);
222223
} else {
@@ -252,18 +253,6 @@ private String getPrompt(String field) {
252253
return "";
253254
}
254255

255-
public void setEntry(BibEntry entry) {
256-
try {
257-
updating = true;
258-
for (FieldEditorFX editor : editors.values()) {
259-
editor.bindToEntry(entry);
260-
}
261-
this.entry = entry;
262-
} finally {
263-
updating = false;
264-
}
265-
}
266-
267256
/**
268257
* Only sets the activeField variable but does not focus it.
269258
* <p>

src/main/java/org/jabref/gui/fieldeditors/DateEditor.fxml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<?import javafx.scene.layout.HBox?>
44
<?import org.jabref.gui.util.component.TemporalAccessorPicker?>
55
<fx:root xmlns:fx="http://javafx.com/fxml/1" type="HBox" xmlns="http://javafx.com/javafx/8.0.112">
6-
<TemporalAccessorPicker fx:id="datePicker" prefHeight="0" HBox.hgrow="ALWAYS"/>
6+
<TemporalAccessorPicker fx:id="datePicker" prefHeight="0" HBox.hgrow="ALWAYS" maxHeight="Infinity"
7+
maxWidth="Infinity"/>
78
</fx:root>

src/main/java/org/jabref/gui/fieldeditors/FieldNameLabel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.jabref.gui.fieldeditors;
22

3+
import javafx.geometry.Insets;
34
import javafx.scene.control.Label;
45

56
import org.jabref.model.entry.FieldName;
@@ -9,6 +10,7 @@ public class FieldNameLabel extends Label {
910
public FieldNameLabel(String fieldName) {
1011
super(FieldName.getDisplayName(fieldName));
1112

13+
setPadding(new Insets(4, 0, 0, 0));
1214
// TODO: style!
1315
//setVerticalAlignment(SwingConstants.TOP);
1416
//setForeground(GUIGlobals.ENTRY_EDITOR_LABEL_COLOR);

src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<?import javafx.scene.layout.StackPane?>
99
<?import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView?>
1010
<fx:root xmlns:fx="http://javafx.com/fxml/1" type="HBox" xmlns="http://javafx.com/javafx/8.0.112">
11-
<ListView fx:id="listView" prefHeight="0" HBox.hgrow="ALWAYS"/>
11+
<ListView fx:id="listView" prefHeight="0" HBox.hgrow="ALWAYS" maxHeight="100"/>
1212
<Button onAction="#addNewFile"
1313
styleClass="flatButton">
1414
<graphic>

src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.jabref.gui.fieldeditors;
22

3+
import javafx.beans.binding.Bindings;
34
import javafx.event.ActionEvent;
45
import javafx.fxml.FXML;
56
import javafx.scene.Node;
@@ -38,7 +39,7 @@ public LinkedFilesEditor(String fieldName, DialogService dialogService, BibDatab
3839
.withTooltip(LinkedFileViewModel::getDescription)
3940
.withGraphic(LinkedFilesEditor::createFileDisplay);
4041
listView.setCellFactory(cellFactory);
41-
listView.itemsProperty().bind(viewModel.filesProperty());
42+
Bindings.bindContent(listView.itemsProperty().get(), viewModel.filesProperty());
4243
}
4344

4445
private static Node createFileDisplay(LinkedFileViewModel linkedFile) {

0 commit comments

Comments
 (0)