diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ccc618e536..64d5105299b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,5 @@ +After reading through this guide, check out some good first issues to contribute to by clicking here: [Good First Issues](https://github.com/JabRef/jabref/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) + ## Understanding the basics 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. Be sure to create a **separate branch** for each improvement you implement. diff --git a/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java b/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java index 098175d865e..72c2bedd70d 100644 --- a/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java +++ b/src/main/java/org/jabref/gui/externalfiles/FindFullTextAction.java @@ -69,14 +69,14 @@ public void execute() { } } - Task, BibEntry>> findFullTextsTask = new Task, BibEntry>>() { + Task>> findFullTextsTask = new Task>>() { @Override - protected Map, BibEntry> call() { - Map, BibEntry> downloads = new ConcurrentHashMap<>(); + protected Map> call() { + Map> downloads = new ConcurrentHashMap<>(); int count = 0; for (BibEntry entry : basePanel.getSelectedEntries()) { FulltextFetchers fetchers = new FulltextFetchers(Globals.prefs.getImportFormatPreferences()); - downloads.put(fetchers.findFullTextPDF(entry), entry); + downloads.put(entry, fetchers.findFullTextPDF(entry)); updateProgress(++count, basePanel.getSelectedEntries().size()); } return downloads; @@ -93,10 +93,10 @@ protected Map, BibEntry> call() { Globals.TASK_EXECUTOR.execute(findFullTextsTask); } - private void downloadFullTexts(Map, BibEntry> downloads) { - for (Map.Entry, BibEntry> download : downloads.entrySet()) { - BibEntry entry = download.getValue(); - Optional result = download.getKey(); + private void downloadFullTexts(Map> downloads) { + for (Map.Entry> download : downloads.entrySet()) { + BibEntry entry = download.getKey(); + Optional result = download.getValue(); if (result.isPresent()) { Optional dir = basePanel.getBibDatabaseContext().getFirstExistingFileDir(Globals.prefs.getFilePreferences()); diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.java b/src/main/java/org/jabref/gui/maintable/MainTable.java index 10c9a278a2b..892116fb337 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.java +++ b/src/main/java/org/jabref/gui/maintable/MainTable.java @@ -36,7 +36,6 @@ import org.jabref.gui.keyboard.KeyBindingRepository; import org.jabref.gui.undo.NamedCompound; import org.jabref.gui.undo.UndoableInsertEntry; -import org.jabref.gui.util.BindingsHelper; import org.jabref.gui.util.CustomLocalDragboard; import org.jabref.gui.util.ViewModelTableRowFactory; import org.jabref.logic.l10n.Localization; @@ -109,7 +108,7 @@ public MainTable(MainTableDataModel model, JabRefFrame frame, } this.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); - this.setItems(BindingsHelper.forUI(model.getEntriesFilteredAndSorted())); + this.setItems(model.getEntriesFilteredAndSorted()); // Enable sorting model.getEntriesFilteredAndSorted().comparatorProperty().bind(this.comparatorProperty()); diff --git a/src/main/java/org/jabref/gui/maintable/MainTableDataModel.java b/src/main/java/org/jabref/gui/maintable/MainTableDataModel.java index 029ef622818..8792e579628 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableDataModel.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableDataModel.java @@ -23,10 +23,10 @@ public class MainTableDataModel { private final SortedList entriesSorted; public MainTableDataModel(BibDatabaseContext context) { - ObservableList allEntries = context.getDatabase().getEntries(); - + ObservableList allEntries = BindingsHelper.forUI(context.getDatabase().getEntries()); + ObservableList entriesViewModel = BindingsHelper.mapBacked(allEntries, BibEntryTableViewModel::new); - + entriesFiltered = new FilteredList<>(entriesViewModel); entriesFiltered.predicateProperty().bind( Bindings.createObjectBinding(() -> this::isMatched, diff --git a/src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialog.fxml b/src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialog.fxml index f6f681e3c40..04121fb296b 100644 --- a/src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialog.fxml +++ b/src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialog.fxml @@ -13,89 +13,102 @@ - - - -
- -
- + + + +
+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + - - - + + - - - - - - - - + + - -
-
-
- - - - - - - - - - - - - -