Open tobiasdiez opened 6 years ago
Hi tobias, sorry, I totally missed your issue.
I haven't used the notification-pane yet but it looks promising. However, I also don't have a good idea at the moment of how to add this feature to our validation API. On the other hand, your code looks reasonably simple so that maybe we don't really need a special API for this. Instead we could add your code example to our wiki page so that others can adopt it if needed.
Sometimes it is desirable to show a validation message in form of a notification pane instead of as a decoration.
Controls.fx already provides a convenient implementation of the notification pane and it is reasonably easy to bind it to a validation status: https://github.com/JabRef/jabref/blob/4471ca5bd0e00a0d8276d1a22becd9ca516d2e7c/src/main/java/org/jabref/gui/entryeditor/SourceTab.java#L85-L91
However, I was not able to fit it to the
visualizer
interface since I have no idea what to pass as the control (otherwise I would have opened a PR instead of an issue). Feel free to adopt my code above!