-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve casing of field names for customize entry types (#9993)
* Preserve casing of field names for customize entry types * Update CHANGELOG.md * Fix checkstyle * Add BibEntryTypePrefsAndFileViewModel * Add BibEntry #withChanged * Replace faux-pas by jool (seems to be more maintained and more easy to use) * Use List.of() * Insist on SortedSet * Add comment on final list * Fix test * Keep casing of known fields * Fix tests
- Loading branch information
Showing
32 changed files
with
332 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,6 @@ public void paste() { | |
*/ | ||
@FunctionalInterface | ||
public interface PasteActionHandler { | ||
|
||
void handle(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/org/jabref/gui/importer/BibEntryTypePrefsAndFileViewModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.jabref.gui.importer; | ||
|
||
import org.jabref.logic.exporter.MetaDataSerializer; | ||
import org.jabref.logic.l10n.Localization; | ||
import org.jabref.model.entry.BibEntryType; | ||
|
||
public record BibEntryTypePrefsAndFileViewModel(BibEntryType customTypeFromPreferences, BibEntryType customTypeFromFile) { | ||
/** | ||
* Used to render in the UI. This is different from {@link BibEntryType#toString()}, because this is the serialization the user expects | ||
*/ | ||
@Override | ||
public String toString() { | ||
return Localization.lang("%0 (from file)\n%1 (current setting)", | ||
MetaDataSerializer.serializeCustomEntryTypes(customTypeFromFile), | ||
MetaDataSerializer.serializeCustomEntryTypes(customTypeFromPreferences)); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.