|Re: Changing return type of owned operations of classes [message #1769205 is a reply to message #1769204]
||Thu, 27 July 2017 15:49
| Ernesto Posse
Registered: March 2011
No need to apologize. It's not obvious, and this is because we inherit the rather awkward way in which you define return types in UML and in Papyrus. In UML, the "return" of an operation is actually a parameter of the operation.|
I've attached a few screenshots.
1. Select the operation in the Model Explorer. In the Properties View you should see the operation's properties (see the "Operation_properties.png" screenshot).
2. On the bottom right you see the list of "Owned parameters". Click [+] to add a new parameter (the "return parameter"). You should now see a dialog for the parameter. (see the "Operation_parameter.png" screenshot). You don't need to give a name to a return parameter.
3. In the "Direction" field, select "return". (see the "Operation_return.png" screenshot).
4. In the "Type" field (see the "Operation_return_type.png" screenshot), click either [...] to select an existing type (you'll have to browse through the model) or [+] to create a new type (typically a UML DataType, Enumeration or Class). In the Type field, you have access to UML primitive types, types from the UML-RT built-in Model Library (like UMLRTTimespec) and types from the Ansi C built-in library.
Powered by FUDForum
. Page generated in 0.01737 seconds