Bug 418318 - [SequenceDiagram] Message Reply displays return value as input argument.
Summary: [SequenceDiagram] Message Reply displays return value as input argument.
Status: NEW
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 0.10.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-30 07:08 EDT by Arie Horst CLA
Modified: 2018-12-21 08:04 EST (History)
1 user (show)

See Also:


Attachments
a model to illustrate the problem (2.44 KB, application/x-zip-compressed)
2018-12-21 08:04 EST, Vincent Lorenzo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arie Horst CLA 2013-09-30 07:08:35 EDT
When an argument is added to a Message Reply which has its signature set to e.g. an operation 'foo' with two owned parameters 'ingoing' and 'result' of which latter one it's direction is set to 'return', the value is incorrectly displayed at the 'ingoing' parameter. So the result is:
foo( int: ingoing = 0 ): int
while expected:
foo( int: ingoing ): int = 0

When adding the argument to the Message Reply (choosing e.g. LiteralInteger) the dialog box is already filled in with the next appropriate suggestion, in this case correctly filled in with 'result'. Nevertheless, the value ends up with the wrong parameter in the sequence diagram. Adding a second argument does not make a difference, which I tried since I know that it doesn't actually matter what name you give to the arguments (they do not have to match with the parameters, it follows the order of them (which by itself I also find rather peculiar)).
Comment 1 Arie Horst CLA 2013-09-30 07:58:14 EDT
correction: the correct formatting for the examples is:
foo( ingoing: int = 0 ): int
and
foo( ingoing: int ): int = 0
Comment 2 Vincent Lorenzo CLA 2018-12-21 08:03:39 EST
In fact, the mask value doesn't work well for the last argument.

@Patrick: 
1. do you know if the argument's name must be equals to the parameter name ? 
2. do you know if it is allowed in UML to define an argument for the return value ? 
3. why the class OperationUtil only accept one return parameter ?
Comment 3 Eclipse Genie CLA 2018-12-21 08:03:59 EST
New Gerrit change created: https://git.eclipse.org/r/134386
Comment 4 Vincent Lorenzo CLA 2018-12-21 08:04:55 EST
Created attachment 276982 [details]
a model to illustrate the problem