-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactor: New Logging framework #52
Conversation
Also redesigned the logs
Log should support regex-powered nearables now. Also, all usages of CodeAnalysis should be ported to use the new Log framework
…links This is very much based on one of the demos
This makes it flow a bit better with the rest of the UI
There were an issue when the very first element added to the logArea was done from a separate thread whilst autoscroll was enabled. This has been sidestepped now.
…ullptr exception Simply scroll by total height instead
Edges dont have an identifier that I can look up yet... Maybe I'll figure something out
715ae4f
to
eebb799
Compare
14ab5be
to
7e648c8
Compare
Update: current implementations of Screen.Recording.2022-11-15.at.22.16.53.mov |
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.
Really cool feature and a very nice graphical representation. Good job 👍
The comments are primarily about improvements to the readability of the code.
src/main/java/dk/cs/aau/huppaal/presentations/LogTabPresentation.java
Outdated
Show resolved
Hide resolved
src/main/java/dk/cs/aau/huppaal/utility/helpers/SelectHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/dk/cs/aau/huppaal/presentations/LogTabPresentation.java
Outdated
Show resolved
Hide resolved
use the java.util.Consumer<T> construct instead of some custom thing
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 implementing the suggestions and explaining some of the features. The PR looks ready to merch 😁 👍
New Logging Framework
This PR adds a revamp of the log-tab panel(s). Providing a much more extendable and unified way for notifying the user with information, warnings and errors.
Screen.Recording.2022-11-12.at.14.33.04.mov
How to use
Using the logging framework is easy, thread-safe and reactive!
Anatomy of a log entry
Add Entries
The basic usage - simply add new logs:
Origin Service
If the log originates from somewhere that is not an internal place (i.e. jecdar, uppaal, codeanalysis or some custom program), you can specify what service generated the log:
Links
You can add inline links to your log message, markdown style:
A link can link to many types of things:
On Log Entry Events
You can also add event listeners for when new logs are added:
Note that the events are being called on the main javafx thread - so you don't need to perform any
Platform.runLater
operations in your handlers.Backwards Compatibility
You may notice that this PR doesn't remove the old tabs. This is on purpose. Links to locations doesn't actually work at the moment, since classes in the
dk.cs.aau.huppaal.abstractions.*
(everything that is aNearable
implementation) doesn't know who their parent component is, so they can't actually create any (working) clickable links. Because of this, I haven't implemented all syntactic elements in theLogLinkQuantifier
enumeration.I have integrated all static functions from
CodeAnalysis
to also use the new logging framework. I haven't deleted the old code though.