From dd7ee64e731c24548da8abbbca730df09877d58e Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Sat, 20 Oct 2018 12:17:21 +0200 Subject: [PATCH] Display deprecated fields in misc entry also in optional fields tab Fixes #4388 --- .../java/org/jabref/gui/entryeditor/OptionalFields2Tab.java | 2 +- .../java/org/jabref/model/entry/BiblatexEntryTypes.java | 2 +- src/main/java/org/jabref/model/entry/EntryType.java | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/jabref/gui/entryeditor/OptionalFields2Tab.java b/src/main/java/org/jabref/gui/entryeditor/OptionalFields2Tab.java index c02cdb27b02..e7e2201366a 100644 --- a/src/main/java/org/jabref/gui/entryeditor/OptionalFields2Tab.java +++ b/src/main/java/org/jabref/gui/entryeditor/OptionalFields2Tab.java @@ -25,6 +25,6 @@ public OptionalFields2Tab(BibDatabaseContext databaseContext, SuggestionProvider @Override protected Collection determineFieldsToShow(BibEntry entry, EntryType entryType) { - return entryType.getSecondaryOptionalNotDeprecatedFields(); + return entryType.getSecondaryOptionalFields(); } } diff --git a/src/main/java/org/jabref/model/entry/BiblatexEntryTypes.java b/src/main/java/org/jabref/model/entry/BiblatexEntryTypes.java index a73f39fcf50..6bce4045cec 100644 --- a/src/main/java/org/jabref/model/entry/BiblatexEntryTypes.java +++ b/src/main/java/org/jabref/model/entry/BiblatexEntryTypes.java @@ -372,7 +372,7 @@ public Set getPrimaryOptionalFields() { FieldName.orFields(FieldName.YEAR, FieldName.DATE)); addAllOptional(FieldName.SUBTITLE, FieldName.TITLEADDON, FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.TYPE, FieldName.VERSION, FieldName.NOTE, FieldName.ORGANIZATION, FieldName.LOCATION, - FieldName.MONTH, FieldName.ADDENDUM, FieldName.PUBSTATE, FieldName.DOI, FieldName.EPRINT, + FieldName.DATE, FieldName.MONTH, FieldName.YEAR, FieldName.ADDENDUM, FieldName.PUBSTATE, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } diff --git a/src/main/java/org/jabref/model/entry/EntryType.java b/src/main/java/org/jabref/model/entry/EntryType.java index aa582893e4f..b74f727e384 100644 --- a/src/main/java/org/jabref/model/entry/EntryType.java +++ b/src/main/java/org/jabref/model/entry/EntryType.java @@ -83,12 +83,6 @@ default Set getDeprecatedFields() { return deprecatedFields; } - default Set getSecondaryOptionalNotDeprecatedFields() { - Set optionalFieldsNotPrimaryOrDeprecated = new LinkedHashSet<>(getSecondaryOptionalFields()); - optionalFieldsNotPrimaryOrDeprecated.removeAll(getDeprecatedFields()); - return optionalFieldsNotPrimaryOrDeprecated; - } - /** * Get list of all optional fields of this entry and their aliases. */