Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add switch to change from biblatex to bibtex and vice versa (fi… #5565
Add switch to change from biblatex to bibtex and vice versa (fi… #5565
Changes from 1 commit
f7e6f77
efae668
134dabe
d145735
2f6c288
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use
ComboBox<BibDatabaseMode>
here (and propagate the change), then you don't have to constantly convert between formatted values and parsed modes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I do so, the names are not formatted anymore. Also, the view would have knowledge about the model.
I normally always try to avoid that by converting the model to non model datatypes. So I would suggest to leave it this way, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get the proper display quite easily using similar code as the one below:
jabref/src/main/java/org/jabref/gui/cleanup/FieldFormatterCleanupsPanel.java
Lines 174 to 177 in a76b8f3
You are right, one should usually not use model classes directly in the ui. So here the "correct" solution would be to wrap the
DatabaseMode
in aDatabaseModeViewModel
which exposes thegetFormattedName
method. I feel like this is however overkill for this particular situation.