diff --git a/README.md b/README.md index cec54b33f74..d0a9efc35f7 100644 --- a/README.md +++ b/README.md @@ -82,11 +82,11 @@ An explanation of donation possibilities and usage of donations is available at > Not a programmer? [Learn how to help.](http://contribute.jabref.org) -Want to be part of a free and open-source project that tens of thousands scientist use every day? -Check out our [issue tracker](https://github.com/JabRef/jabref/issues) to find something to work on. -You are also welcome to contribute new features. -To get your code included into JabRef, just fork JabRef and create a pull request. -For details have a look at our [guidelines for contributing](CONTRIBUTING.md). +Want to be part of a free and open-source project that tens of thousands scientist use every day? Check out the ways you can contribute, below: +- For details on how to contribute, have a look at our [guidelines for contributing](CONTRIBUTING.md). +- You are welcome to contribute new features. To get your code included into JabRef, just [fork](https://help.github.com/en/articles/fork-a-repo) the JabRef repository, make your changes, and create a [pull request](https://help.github.com/en/articles/about-pull-requests). +- To work on existing JabRef issues, check out our [issue tracker](https://github.com/JabRef/jabref/issues). New to open source contributing? Look for issues with the ["good first issue"](https://github.com/JabRef/jabref/labels/good%20first%20issue) label to get started. + We view pull requests as a collaborative process. Submit a pull request early to get feedback from the team on work in progress. We will discuss improvements with you and agree to merge them once the [developers](https://github.com/JabRef/jabref/blob/master/DEVELOPERS) approve. diff --git a/build.gradle b/build.gradle index 3731ef3acbb..1f1847f2b2a 100644 --- a/build.gradle +++ b/build.gradle @@ -138,7 +138,7 @@ dependencies { // Cannot be updated to 9.*.* until Jabref works with Java 9 compile 'org.controlsfx:controlsfx:8.40.15-SNAPSHOT' - compile 'org.jsoup:jsoup:1.11.3' + compile 'org.jsoup:jsoup:1.12.1' compile 'com.mashape.unirest:unirest-java:1.4.9' // >1.8.0-beta is required for java 9 compatibility 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 57d0f4439f1..5ef91744ea9 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableDataModel.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableDataModel.java @@ -22,10 +22,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/logic/importer/IdBasedParserFetcher.java b/src/main/java/org/jabref/logic/importer/IdBasedParserFetcher.java index 29c1ded0e05..9dd2ec28401 100644 --- a/src/main/java/org/jabref/logic/importer/IdBasedParserFetcher.java +++ b/src/main/java/org/jabref/logic/importer/IdBasedParserFetcher.java @@ -11,8 +11,8 @@ import org.jabref.logic.net.URLDownload; import org.jabref.model.cleanup.Formatter; import org.jabref.model.entry.BibEntry; +import org.jabref.model.strings.StringUtil; -import org.jsoup.helper.StringUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java b/src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java index 4d1cf696ae6..dd7b732c9ff 100644 --- a/src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java +++ b/src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java @@ -11,8 +11,7 @@ import org.jabref.logic.net.URLDownload; import org.jabref.model.cleanup.Formatter; import org.jabref.model.entry.BibEntry; - -import org.jsoup.helper.StringUtil; +import org.jabref.model.strings.StringUtil; /** * Provides a convenient interface for search-based fetcher, which follow the usual three-step procedure: diff --git a/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java b/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java index 6b99f420526..c940d07b193 100644 --- a/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java +++ b/src/main/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystem.java @@ -30,10 +30,10 @@ import org.jabref.model.cleanup.FieldFormatterCleanup; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.FieldName; +import org.jabref.model.strings.StringUtil; import org.jabref.model.util.DummyFileUpdateMonitor; import org.apache.http.client.utils.URIBuilder; -import org.jsoup.helper.StringUtil; /** * Fetches data from the SAO/NASA Astrophysics Data System (http://www.adsabs.harvard.edu/) diff --git a/src/main/java/org/jabref/logic/importer/fetcher/IsbnFetcher.java b/src/main/java/org/jabref/logic/importer/fetcher/IsbnFetcher.java index c1d13f862e9..ac74cec7aca 100644 --- a/src/main/java/org/jabref/logic/importer/fetcher/IsbnFetcher.java +++ b/src/main/java/org/jabref/logic/importer/fetcher/IsbnFetcher.java @@ -11,9 +11,9 @@ import org.jabref.logic.importer.ImportFormatPreferences; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.FieldName; +import org.jabref.model.strings.StringUtil; import org.jabref.model.util.OptionalUtil; -import org.jsoup.helper.StringUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/jabref/logic/importer/fetcher/IsbnViaChimboriFetcher.java b/src/main/java/org/jabref/logic/importer/fetcher/IsbnViaChimboriFetcher.java index 82c50b95ff4..4ddd9fa17a5 100644 --- a/src/main/java/org/jabref/logic/importer/fetcher/IsbnViaChimboriFetcher.java +++ b/src/main/java/org/jabref/logic/importer/fetcher/IsbnViaChimboriFetcher.java @@ -10,11 +10,11 @@ import org.jabref.logic.importer.ImportFormatPreferences; import org.jabref.logic.importer.ParseException; import org.jabref.model.entry.BibEntry; +import org.jabref.model.strings.StringUtil; import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; import com.mashape.unirest.http.exceptions.UnirestException; -import org.jsoup.helper.StringUtil; /** * Fetcher for ISBN using https://bibtex.chimbori.com/, which in turn uses Amazon's API.