-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 preference to disable validation in the entry editor by default #3154
Conversation
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.
Thanks for taking care of this! In general it looks good to me (nice refactoring by the way!). Only a remark about Globals
.
public class EditorValidator { | ||
|
||
public static void configureValidation(ValidationStatus status, EditorTextArea area) { | ||
if (Globals.prefs.getBoolean(JabRefPreferences.VALIDATE_IN_ENTRY_EDITOR)) { |
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.
Can you please not use Globals.prefs
. I really tried hard to make the JavaFX stuff free of Globals
. You can simply pass a preference instance to the editor (similar how it is done in the OwnerEditor) and then to this method here (mabye as new EntryValidator(preferences).configureValidation(...))
).
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.
Done! Good point also, we should thrive to keep this independent from Globals
. I even spotted one more usage in FieldEditors
that you seem to have overlooked ;-)
# Conflicts: # src/main/java/org/jabref/gui/fieldeditors/FieldEditors.java
Since the review comments have been addressed and for the sake of getting things done, I am merging this now. |
* upstream/master: Add preference to disable validation in the entry editor by default (#3154) Fix freezing on browse in protected terms dialog when adding from entry editor (#3158) Close entry editor when the shown entry is removed externally (#3156) .jar are not ignored any more (#3155) Increase size of file and keywords editors (#3141) Make Replace Strings work in bibtexkeyfield Fix errorprone (#3151) Fix display of percentage symbol in entry preview (#3149)
Adds a preference option for enabling/disabling validation in the entry editor: #3100 (but not the UI)
The reason is because the validation is simply broken at the moment #3145
The preference option is set to false by default and there is no UI to change it. So this turns off validation in the entry editor. We can add the UI to turn it on later, when the display bug in controlsfx has been fixed.
When this is merged, the related issues can be removed from the 4.0 milestone.
gradle localizationUpdate
?