Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351063

Summary: [Communication Diagram] [Enhancement]Sequence number is missing on Message
Product: [Modeling] Papyrus Reporter: Vincent Hémery <vincent.hemery>
Component: CoreAssignee: Vincent Lorenzo <vincent.lorenzo>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: arnaud.cuccuru, dhouib
Version: 0.8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
this patch modifies the messages xtext grammam to authorize the use of brackets in the message name vincent.lorenzo: iplog+

Description Vincent Hémery CLA 2011-07-04 05:38:23 EDT
In Communication diagram, Message labels miss the sequence number.

In UML specification, see Figure 14.28 - Communication diagram.
Showing only the message label gives no sequencing order and make it impossible to understand a complex communication diagram. This label should be preceded by the sequence number.

Sequence number should be deduced from the fragments order in the model, being the ones of a valid trace.
Comment 1 saadia dhouib CLA 2011-07-12 10:30:59 EDT
You can define the sequence number of the message using the xtext embedded editor for messages.
You have to enable this editor through: window -> preferences -> papyrus -> embedded editors
choose the element to edit: org.eclipse.uml2.uml.Message
choose the associated editor: Advanced message editor
Comment 2 Vincent Hémery CLA 2011-07-13 04:17:26 EDT
Indeed. I hadn't seen this editor.

Shouldn't the default label display the same text with numbering by default?
I find it really odd to have to edit the label to change the way it is displayed, once we have chosen the xtext editor as default one.

When I try editing a message label in my message, I get the error message
"missing EOF at '('" in the xtext editor.
Hence, I can not display the label with the advanced editor.
Any idea where this error comes from ?

Another point, the number initialization seems to rely on the order of messages in the 'message' relationship, whereas I would have expected it to rely on the fragment's order (order of send events).

Finally, I find it sad that the sequence number is just included in the name and has no impact at all on the order of fragments (nor messages). We shouldn't need to include this number in the label, since its semantic is already present in the model as the fragments order. Yet, with current implementation this semantic is erased to be moved to the name itself.
Hence, when we edit "2: getDetailReport( )" to "1: getDetailReport( )", we get 2 "1: ..." labeled messages, which makes the numbering inconsistent.

I am not saying this implementation is simple. I even do not know if it could be done with a 'classic' xtext editor. Moreover, I have no idea how we could handle the consistency if we also have a sequence diagram drawn under the same interaction.
Clearly, this is a subject we should debate.
Comment 3 saadia dhouib CLA 2011-07-13 09:01:36 EDT
Shouldn't the default label display the same text with numbering by default?
I find it really odd to have to edit the label to change the way it is displayed, once we have chosen the xtext editor as default one.

>>Arnaud, do you have an idea about this?

When I try editing a message label in my message, I get the error message
"missing EOF at '('" in the xtext editor.
Hence, I can not display the label with the advanced editor.
Any idea where this error comes from ?

>> I have modified the xtext grammar to authorize the use of brackets in the message's name.

Another point, the number initialization seems to rely on the order of messages in the 'message' relationship, whereas I would have expected it to rely on the fragment's order (order of send events).

>> is the order of send events stored in the model?

Finally, I find it sad that the sequence number is just included in the name and has no impact at all on the order of fragments (nor messages). We shouldn't need to include this number in the label, since its semantic is already present in the model as the fragments order. Yet, with current implementation this semantic is erased to be moved to the name itself.
Hence, when we edit "2: getDetailReport( )" to "1: getDetailReport( )", we get 2 "1: ..." labeled messages, which makes the numbering inconsistent.

I am not saying this implementation is simple. I even do not know if it could be done with a 'classic' xtext editor. Moreover, I have no idea how we could handle the consistency if we also have a sequence diagram drawn under the same interaction.
Clearly, this is a subject we should debate.

>> this is not to easy to implement. This has to be considered as an enhancement issue.
Comment 4 saadia dhouib CLA 2011-07-13 09:03:37 EDT
Created attachment 199578 [details]
this patch modifies the messages xtext grammam to authorize the use of brackets in the message name

# '1) I, Saadia Dhouib, wrote 100% of the code I've provided.
# (2) This code contains no cryptography
# (3) I have the right to contribute the code to Eclipse.
# (4) I contribute the content under the EPL.
Comment 5 Vincent Lorenzo CLA 2011-07-13 09:17:58 EDT
Comment on attachment 199578 [details]
this patch modifies the messages xtext grammam to authorize the use of brackets in the message name

Commited in R5039
Comment 6 Vincent Lorenzo CLA 2011-07-13 09:56:23 EDT
The other points of this bug are considered as enhancements according to Comment 3. I set the severity to enhancement.
Comment 7 Vincent Lorenzo CLA 2011-07-13 10:27:49 EDT
Comment on attachment 199578 [details]
this patch modifies the messages xtext grammam to authorize the use of brackets in the message name

This patch has been commited in the trunk (merge action) in R5042
Comment 8 Sébastien Gérard CLA 2013-02-12 04:54:32 EST
closed