Skip to content
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

Initial Draft of Message Direct Editor #18

Closed
wants to merge 4 commits into from
Closed

Conversation

cdamus
Copy link
Collaborator

@cdamus cdamus commented Feb 24, 2018

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.

Request messages:
- operation and signal signatures
- arguments with and without names
- primitive argument values (no expressions)
- wildcard arguments

Reply messages:
- wildcard output parameter assignments
- unassigned output parameters with primitive values
- assigned output parameters with primitive values
- assigned operation return result, wildcard or with value
- unassigned operation return result

Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
Unit tests for some basic components:
- MessageParser for display of messages in the diagram
- utilities supporting the Xtext direct editor
As the Xtext direct editor is still being developed on the
Papyrus Sequence Diagram, isolate dependencies of
the direct editor and label parser on visual IDs in a
dedicated quarantine.
Implement qualification of references to lifeline
attributes assigned in reply messages.
@planger
Copy link
Collaborator

planger commented Sep 24, 2018

I think we can close this PR as this contribution is handled via #337 right? If you disagree, please feel free to reopen. Thanks!

@planger planger closed this Sep 24, 2018
@cdamus
Copy link
Collaborator Author

cdamus commented Sep 24, 2018

@planger Agreed, that PR should supersede this one. However, do we have resources to move that one along? Can I do something to help?

@planger
Copy link
Collaborator

planger commented Sep 24, 2018

Sorry, I meant to add this #337 (comment) here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants