Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Changing return type of owned operations of classes
Changing return type of owned operations of classes [message #1769204] Thu, 27 July 2017 15:27 Go to next message
Christopher Won is currently offline Christopher WonFriend
Messages: 11
Registered: July 2017
Junior Member
Sorry for this simple question, I'm still quite new to papyrus-rt but i can't seem to figure out how to change the return type of owned operations of classes.

Thanks in advance
Re: Changing return type of owned operations of classes [message #1769205 is a reply to message #1769204] Thu, 27 July 2017 15:49 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
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.

Previous Topic:Papyrus-RT v1.0 is available
Next Topic:Using timeout in action code and querying current state in another state machine
Goto Forum:
  


Current Time: Fri Mar 29 08:55:51 GMT 2024

Powered by FUDForum. Page generated in 0.04401 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top