Add some javadoc and fix the preview update issue#6516
Conversation
|
Thanks, codewise looks good to me. We are currently in the process of refactoring the preferences in general and trying to solve the "updating of preferences" without restarting JabRef as well. |
What is the current idea of refactoring these preferences code? I wonder where I can see these discussions? Thanks! |
|
@leitianjian : developer discussion happens here: https://gitter.im/JabRef/jabref . |
Thanks for your kindness. Recently I'm busy with other things. So, I cannot fully participate in it, but, I will keep track of your pr and the chat in gitter. Maybe I can learn something or provide some ideas |
|
Thanks again for your contribution! I took the freedom to merge it ;) |
|
Thanks! |
Fixes #6447
I have taken a long time considering how to update the preview when preference change. After I found that the PreviewPanel will be bind to entry in FieldsEditorTab.java, then we can just update the layout in PreviewPanel.java#setEntry()
Some ideas:
Can we using observer pattern to refactor the code: JabRefPreferences as Observable object and component need preferences can register as Observer. If the preferences were changed, we can notify the affected component to do an update?