Initial Draft of Message Direct Editor #18
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An initial draft of a parser and direct editor for message labels in sequence diagrams that implements the UML 2.5.1 specification, per Issue #16.
The main caveat is that this parser and direct editor target the Papyrus Sequence Diagram edit-parts as implemented by the Papyrus Project, because we do not yet have a Lightweight Sequence Diagram that can draw messages. There are
FIXME
comments in the code at locations that will have to change to target the new diagram. So, this is still to be considered work in progress and probably not to be merged.Message Parser
This prints message labels as prescribed by the UML specification. As discussed off-line, it does not yet include message numbering because that will most probably depend on the Dependency Graph, which design is not settled.
I have tried to be compact in the use of whitespace without sacrificing readability too much. This can, of course, always change.
Direct Editor
This is partially based on Antonio's Gerrit patch from 2016, linked in the issue, and much elaborated. In particular, reply messages are supported, both in parsing and in content-assist. Also, because the syntactic structure of request and reply messages is so similar as to actually hobble content assist especially, I have exposed the two families of messages each as an entry-point Antlr rule.
Testing
Unit tests are provided for the label parser and for several utility classes supporting the Xtext direct editor, but there are no tests for the editor, itself. I expect that this will have to be an RCPTT task.