-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added support for UML ExecutionSpecifications #157
base: master
Are you sure you want to change the base?
Added support for UML ExecutionSpecifications #157
Conversation
I've added support for UML ExecutionSpecifications, which are the grey bars commonly seen in UML Sequence Diagrams, and indicate the execution of an action. Using them is quite simple, all you need to do is prepend a `+` or `-` character before the actor/lifeline that will be executing an action. The `+` character will begin the ExecutionSpecification, and the `-` character will end it. Example ------- The following example shows an API executing a function in response to a user calling function foo(). User->+API: foo() note right of foo: Processing foo. -API-->User: Result.
Signals were being rendered before execution specifications because I was using the signal draw code to calculate the y position of each signal. Signal y-positions are now calculated independently by the execution specification drawing code. This means execution specifications no longer overlay signal arrows and/or labels.
Tests syntax changes, and makes sure it doesn't break anything else.
Also did some cleanup and updated the EBNF grammar.
Issue discussion here: #156 |
Awesome, a quick glance and things look good! I need to find some time to properly review. However quick comment, 'executionSpecification' seems long, can we just drop the word specification or spec everywhere. I think without it out is still easy to read and understand the code. |
Can do! Don't review this until I've done that, I've found some more avenues for refactoring. |
@bramp Good to go! Also, I added an error message for the issue described in the main pull-request post. |
@@ -108,6 +176,12 @@ | |||
OVER : 2 | |||
}; | |||
|
|||
Diagram.EXECUTION_LVL_CHANGE = { |
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.
Maybe just "Diagram.EXECUTION_CHANGE"
I'm confused a little at what it means for level to be > 1. Would you show me an example where you mix different levels. |
|
Made some changes addressing your comments. |
Hey, @bramp just a friendly ping to see the progress of this review? |
👍 Any hope to see progress on this awesome change? |
Friendly ping 🙂. Would love to see this land. |
I've added support for UML ExecutionSpecifications, which are the grey
bars commonly seen in UML Sequence Diagrams, and indicate the execution
of an action.
Using them is quite simple, all you need to do is prepend a
+
or-
character before the actor/lifeline that will be executing an action.
The
+
character will begin the ExecutionSpecification, and the-
character will end it.
Example
The following example shows an API executing a function in response to
a user calling function foo().
Known Issues:
Doing a double jump in a single self-signal will cause some rendering issues. I don't expect this will be commonly encountered.