| Modifier and Type | Field and Description |
|---|---|
| private static final Set | |
| private static final Set | |
| private static final Set | LEGACY_GENERAL_TAB_NAMES
The names the default tabs were stored under, in every translation shipped between JabRef 3.8.2 and the 6.0 alphas (harvested from the v3.8.2, v4.3.1, and v5.15 tags plus the current bundles), lower-cased. |
| private static final Set | |
| private static final Logger | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| pack-priv static void | |
| private static void | |
| private static boolean | isLegacyDefaultTab(String name, List<String> fields)
Whether a pre-v6.0-alpha.7 custom tab is one of the former default tabs "General", "Abstract", "Comments" (JabRef 5.x), or "Review" (JabRef ≤ 4.x). |
| private static Set | legacyGeneralFieldSets()
The "General" default field set as shipped over time: |
| pack-priv static void | migrateFileAnnotationsTabVisibility(JabRefGuiPreferences prefs)
The legacy key |
| private static void | migrateFileImportPattern(String oldStylePattern, String newStylePattern, JabRefCliPreferences prefs)
|
| private static void | |
| pack-priv static void | |
| pack-priv static void | restoreVariablesForBackwardCompatibility(JabRefCliPreferences preferences)
In 5.0 the format of column names have changed. |
| public static void | runMigrations(JabRefGuiPreferences preferences)
Perform checks and changes for users with a preference set from an older JabRef version. |
| protected static void | upgradeBuiltinPreviewName(JabRefGuiPreferences prefs)
Since v6-alpha6 built in preview style will be stored by internal identifier instead by display name. |
| pack-priv static void | upgradeCleanups(JabRefCliPreferences prefs)
In version 6.0 the formatting of the CleanUps preferences changed. |
| pack-priv static void | upgradeColumnPreferences(JabRefCliPreferences preferences)
The former preferences default of columns was a simple list of strings ("author;title;year;..."). |
| pack-priv static void | upgradeEntryEditorCustomTabs(JabRefGuiPreferences prefs)
Up to and including v6.0-alpha.6, custom entry editor tabs were stored in two parallel numbered
series ( |
| pack-priv static void | upgradeImportFileAndDirePatterns(JabRefCliPreferences prefs)
Migrate Import File Name and Directory name Patterns from versions <=4.0 to new BracketedPatterns |
| pack-priv static void | |
| private static void | upgradeLabelPatternToCitationKeyPattern(JabRefCliPreferences prefs, Preferences mainPrefsNode)
Migrate LabelPattern configuration from versions <=3.5 to new CitationKeyPatterns. |
| pack-priv static void | upgradeMacKeyBindingDefaults(JabRefCliPreferences prefs, boolean isMacOs)
Updates unchanged key bindings in snapshots persisted before macOS-specific defaults were introduced. |
| private static void | upgradePrefsToOrgJabRef(Preferences mainPrefsNode)
Migrate all preferences from net/sf/jabref to org/jabref |
| protected static void | |
| pack-priv static void | |
| private static void | upgradeSortOrder(JabRefCliPreferences prefs)
Upgrade the sort order preferences for the current version The old preference is kept in case an old version of JabRef is used with these preferences, but it is only used when the new preference does not exist |
| private static void | upgradeStoredBibEntryTypes(JabRefCliPreferences prefs, Preferences mainPrefsNode, BibEntryTypesManager entryTypesManager)
Migrate all customized entry types from versions <=3.7 |
| pack-priv static void | upgradeTheme(JabRefGuiPreferences preferences)
upgrade the old theme css names of the theme to the new theme properties Theme names were changed in #15573 The old keys are deleted after reading them, so the migration runs at most once -- migrations run on every startup, and re-applying the old value each time would overwrite whatever the user selected in the new UI in the meantime. |
| private static Set |
| LEGACY_ABSTRACT_TAB_NAMES | back to summary |
|---|---|
| private static final Set<String> LEGACY_ABSTRACT_TAB_NAMES | |
| LEGACY_COMMENTS_TAB_NAMES | back to summary |
|---|---|
| private static final Set<String> LEGACY_COMMENTS_TAB_NAMES | |
| LEGACY_GENERAL_TAB_NAMES | back to summary |
|---|---|
| private static final Set<String> LEGACY_GENERAL_TAB_NAMES The names the default tabs were stored under, in every translation shipped between JabRef 3.8.2 and the 6.0 alphas (harvested from the v3.8.2, v4.3.1, and v5.15 tags plus the current bundles), lower-cased. Inlined instead of read from the current bundles: translations change and languages get dropped (the "Review" l10n key is already gone), which would silently stop the migration from recognizing names stored by old versions. Untranslated languages fell back to the English name. | |
| LEGACY_REVIEW_TAB_NAMES | back to summary |
|---|---|
| private static final Set<String> LEGACY_REVIEW_TAB_NAMES | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| V4_0_IMPORT_FILENAME_PATTERN | back to summary |
|---|---|
| public static final String V4_0_IMPORT_FILENAME_PATTERN | |
| PreferencesMigrations | back to summary |
|---|---|
| private PreferencesMigrations() | |
| addCrossRefRelatedFieldsForAutoComplete | back to summary |
|---|---|
| private static void addCrossRefRelatedFieldsForAutoComplete(JabRefCliPreferences prefs) | |
| changeColumnVariableNamesFor51 | back to summary |
|---|---|
| pack-priv static void changeColumnVariableNamesFor51(JabRefCliPreferences preferences) | |
| copyPrefsRecursively | back to summary |
|---|---|
| private static void copyPrefsRecursively(Preferences from, Preferences to) throws BackingStoreException | |
| isLegacyDefaultTab | back to summary |
|---|---|
| private static boolean isLegacyDefaultTab(String name, List<String> fields) Whether a pre-v6.0-alpha.7 custom tab is one of the former default tabs "General", "Abstract", "Comments" (JabRef 5.x), or "Review" (JabRef ≤ 4.x). Old versions wrote the default tabs to the store as if the user had defined them (any "Save" in the preferences dialog and the former per-startup General-fields migration did), so the store cannot tell defaults from customizations. Since #12711 the "Main" tab shows all these fields, so such a tab is pure duplication. A tab counts as a default only if its name and its fields match as a shipped pair: a translation of "Abstract"/"Comments"/"Review" (names were stored localized, and not necessarily in the current language) with exactly its shipped single field, or a translation of "General" with exactly one of the shipped default field sets. A cross-match (e.g. an "Abstract" tab holding the General fields) is a customization and is kept. | |
| legacyGeneralFieldSets | back to summary |
|---|---|
| private static Set The "General" default field set as shipped over time: | |
| migrateFileAnnotationsTabVisibility | back to summary |
|---|---|
| pack-priv static void migrateFileAnnotationsTabVisibility(JabRefGuiPreferences prefs) The legacy key | |
| migrateFileImportPattern | back to summary |
|---|---|
| private static void migrateFileImportPattern(String oldStylePattern, String newStylePattern, JabRefCliPreferences prefs) | |
| migrateTypedKeyPrefs | back to summary |
|---|---|
| private static void migrateTypedKeyPrefs(JabRefCliPreferences prefs, Preferences oldPatternPrefs) throws BackingStoreException | |
| moveApiKeysToKeyring | back to summary |
|---|---|
| pack-priv static void moveApiKeysToKeyring(JabRefCliPreferences preferences) | |
| restoreVariablesForBackwardCompatibility | back to summary |
|---|---|
| pack-priv static void restoreVariablesForBackwardCompatibility(JabRefCliPreferences preferences) In 5.0 the format of column names have changed. That made newer versions of JabRef preferences incompatible with earlier versions of JabRef. As some complains came up, we decided to change the variable names and to clear the variable contents if they are unreadable, so former versions of JabRef would automatically create preferences they can deal with. | |
| runMigrations | back to summary |
|---|---|
| public static void runMigrations(JabRefGuiPreferences preferences) Perform checks and changes for users with a preference set from an older JabRef version. | |
| upgradeBuiltinPreviewName | back to summary |
|---|---|
| protected static void upgradeBuiltinPreviewName(JabRefGuiPreferences prefs) Since v6-alpha6 built in preview style will be stored by internal identifier instead by display name. | |
| upgradeCleanups | back to summary | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pack-priv static void upgradeCleanups(JabRefCliPreferences prefs) In version 6.0 the formatting of the CleanUps preferences changed. Instead of using several keys that have have a variable name a single preference key is introduced containing just the active cleanup jobs. Also instead of a combined field for the field formatters and the enabled status of all of them, they are split for easier parsing. Changes
| |||||||||||||||||||||||||||
| upgradeColumnPreferences | back to summary |
|---|---|
| pack-priv static void upgradeColumnPreferences(JabRefCliPreferences preferences) The former preferences default of columns was a simple list of strings ("author;title;year;..."). Since 5.0 the preferences store the type of the column too, so that the formerly hardwired columns like the graphic groups column or the other icon columns can be reordered in the main table and behave like any other field column ("groups;linked_id;field:author;special:readstatus;extrafile:pdf;..."). Simple strings are by default parsed as a FieldColumn, so there is nothing to do there, but the formerly hard wired columns need to be added. In 5.1 variable names in JabRefPreferences have changed to offer backward compatibility with pre 5.0 releases Pre 5.1: columnNames, columnWidths, columnSortTypes, columnSortOrder Since 5.1: mainTableColumnNames, mainTableColumnWidths, mainTableColumnSortTypes, mainTableColumnSortOrder | |
| upgradeEntryEditorCustomTabs | back to summary |
|---|---|
| pack-priv static void upgradeEntryEditorCustomTabs(JabRefGuiPreferences prefs) Up to and including v6.0-alpha.6, custom entry editor tabs were stored in two parallel numbered
series ( | |
| upgradeImportFileAndDirePatterns | back to summary |
|---|---|
| pack-priv static void upgradeImportFileAndDirePatterns(JabRefCliPreferences prefs) Migrate Import File Name and Directory name Patterns from versions <=4.0 to new BracketedPatterns | |
| upgradeKeyBindingsToJavaFX | back to summary |
|---|---|
| pack-priv static void upgradeKeyBindingsToJavaFX(JabRefCliPreferences prefs) | |
| upgradeLabelPatternToCitationKeyPattern | back to summary |
|---|---|
| private static void upgradeLabelPatternToCitationKeyPattern(JabRefCliPreferences prefs, Preferences mainPrefsNode) Migrate LabelPattern configuration from versions <=3.5 to new CitationKeyPatterns. Introduced in #1704 | |
| upgradeMacKeyBindingDefaults | back to summary |
|---|---|
| pack-priv static void upgradeMacKeyBindingDefaults(JabRefCliPreferences prefs, boolean isMacOs) Updates unchanged key bindings in snapshots persisted before macOS-specific defaults were introduced. | |
| upgradePrefsToOrgJabRef | back to summary |
|---|---|
| private static void upgradePrefsToOrgJabRef(Preferences mainPrefsNode) Migrate all preferences from net/sf/jabref to org/jabref | |
| upgradePreviewStyle | back to summary |
|---|---|
| protected static void upgradePreviewStyle(JabRefGuiPreferences prefs) Customizable preview style migrations | |
| upgradeResolveBibTeXStringsFields | back to summary |
|---|---|
| pack-priv static void upgradeResolveBibTeXStringsFields(JabRefCliPreferences prefs) | |
| upgradeSortOrder | back to summary |
|---|---|
| private static void upgradeSortOrder(JabRefCliPreferences prefs) Upgrade the sort order preferences for the current version The old preference is kept in case an old version of JabRef is used with these preferences, but it is only used when the new preference does not exist | |
| upgradeStoredBibEntryTypes | back to summary |
|---|---|
| private static void upgradeStoredBibEntryTypes(JabRefCliPreferences prefs, Preferences mainPrefsNode, BibEntryTypesManager entryTypesManager) Migrate all customized entry types from versions <=3.7 | |
| upgradeTheme | back to summary |
|---|---|
| pack-priv static void upgradeTheme(JabRefGuiPreferences preferences) upgrade the old theme css names of the theme to the new theme properties Theme names were changed in #15573 The old keys are deleted after reading them, so the migration runs at most once -- migrations run on every startup, and re-applying the old value each time would overwrite whatever the user selected in the new UI in the meantime. | |
| withFields | back to summary |
|---|---|
| private static Set | |