Skip to content

Commit

Permalink
modify prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
zesaro committed Aug 25, 2016
1 parent 9615f10 commit bc6efe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import java.util.LinkedList;
import java.util.List;

import net.sf.jabref.Globals;
import net.sf.jabref.logic.importer.ImportFormatPreferences;
import net.sf.jabref.logic.importer.fetcher.ArXiv;
import net.sf.jabref.logic.importer.fetcher.GvkFetcher;
import net.sf.jabref.logic.importer.fetcher.IsbnFetcher;
Expand All @@ -29,7 +31,7 @@ public EntryFetchers(JournalAbbreviationLoader abbreviationLoader) {
entryFetchers.add(new DOAJFetcher());
entryFetchers.add(new SpringerFetcher());

entryFetchers.add(new IdBasedEntryFetcher(new IsbnFetcher()));
entryFetchers.add(new IdBasedEntryFetcher(new IsbnFetcher(ImportFormatPreferences.fromPreferences(Globals.prefs))));
entryFetchers.add(new SearchBasedEntryFetcher(new ArXiv()));
entryFetchers.add(new SearchBasedEntryFetcher(new GvkFetcher()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.net.URL;
import java.util.Optional;

import net.sf.jabref.Globals;
import net.sf.jabref.logic.help.HelpFile;
import net.sf.jabref.logic.importer.FetcherException;
import net.sf.jabref.logic.importer.IdBasedFetcher;
Expand All @@ -44,8 +43,8 @@ public class IsbnFetcher implements IdBasedFetcher {
private static final String URL_PATTERN = "http://www.ebook.de/de/tools/isbn2bibtex?";
private ImportFormatPreferences prefs;

public IsbnFetcher(){
prefs = ImportFormatPreferences.fromPreferences(Globals.prefs);
public IsbnFetcher(ImportFormatPreferences prefs) {
this.prefs = prefs;
}

@Override
Expand Down

0 comments on commit bc6efe6

Please sign in to comment.