Closed sillydan1 closed 1 year ago
Update: current implementations of Nearable
will be linked correctly (the old tabs are still present, but I am fairly sure they could be removed pretty soon):
https://user-images.githubusercontent.com/4085393/202027530-b6229cac-c9ea-4bec-8949-d29b8dda8f2b.mov
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.
https://user-images.githubusercontent.com/4085393/201477650-6a3271aa-acbc-47a8-ace3-d2394bdc94a4.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.