Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » creating operation parameters(creating operation parameters with ParameterDirectionKind return)
creating operation parameters [message #1794783] Thu, 06 September 2018 12:51 Go to next message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 48
Registered: August 2009
Member
Hi QVTo Community,

I am transforming class operations form source class attributes (getter and setter). The getter should get a return type based on the type of the attribute, more concrete the type will be generated from the Attributes type and the ParameterDirectionKind should be "return".

ownedParameter += object Parameter
{
name := '';
type := self.type.getPrimitiveType (pt);
direction := ParameterDirectionKind::return;
};

The problem is:
The direction-assignment does not work. Token "return" is invalid.

Is it? What can I do instead?

This Problem concerns the direction kinds "in", "out", "inout", too.

I am working with Eclipse 4.7.3, QVTo SDK 3.7.0.

Thanks for help,
Siegfried

[Updated on: Thu, 06 September 2018 13:20]

Report message to a moderator

Re: creating operation parameters [message #1794785 is a reply to message #1794783] Thu, 06 September 2018 13:07 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I presume that you are using the UML metamodel in which case I would agree with your expectation. Except that "return" is a reserved word so you need to escape it "_return" is quickest but not always applicable and unambiguous so "_'return'" is now favoured by the standard.

Regards

Ed Willink
Re: creating operation parameters [message #1794792 is a reply to message #1794785] Thu, 06 September 2018 14:51 Go to previous message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 48
Registered: August 2009
Member
Yes, I am using the UML metamodel; I forgot to mention it.

And you are right, escaping the reserved words did it.
I choose "_return" first.

Thank you und best regards,
Siegfried
Previous Topic:About Family2Person Transformation
Next Topic:creating operation parameters
Goto Forum:
  


Current Time: Thu Apr 18 22:43:50 GMT 2024

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

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

Back to the top