From 349ba2261b795c59972ffe40c85e0bc6750dbb95 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sat, 19 Oct 2024 15:59:58 +0200 Subject: [PATCH] Add some links into the code --- .../java/org/jabref/gui/mergeentries/FetchAndMergeEntry.java | 1 + src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/java/org/jabref/gui/mergeentries/FetchAndMergeEntry.java b/src/main/java/org/jabref/gui/mergeentries/FetchAndMergeEntry.java index dbe205a24c4..c14e0770c15 100644 --- a/src/main/java/org/jabref/gui/mergeentries/FetchAndMergeEntry.java +++ b/src/main/java/org/jabref/gui/mergeentries/FetchAndMergeEntry.java @@ -40,6 +40,7 @@ */ public class FetchAndMergeEntry { + // All identifiers listed here should also appear at {@link org.jabref.logic.importer.CompositeIdFetcher#performSearchById} public static List SUPPORTED_FIELDS = Arrays.asList(StandardField.DOI, StandardField.EPRINT, StandardField.ISBN); private static final Logger LOGGER = LoggerFactory.getLogger(FetchAndMergeEntry.class); diff --git a/src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java b/src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java index 83d939a3085..ffde24b1af9 100644 --- a/src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java +++ b/src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java @@ -20,6 +20,8 @@ public CompositeIdFetcher(ImportFormatPreferences importFormatPreferences) { } public Optional performSearchById(String identifier) throws FetcherException { + // All identifiers listed here should also be appear at {@link org.jabref.gui.mergeentries.FetchAndMergeEntry.SUPPORTED_FIELDS} and vice versa. + Optional doi = DOI.findInText(identifier); if (doi.isPresent()) { return new DoiFetcher(importFormatPreferences).performSearchById(doi.get().getNormalized());