Skip to main content



      Home
Home » Modeling » QVT-OML » creating operation parameters(creating operation parameters with ParameterDirectionKind return)
creating operation parameters [message #1794783] Thu, 06 September 2018 08:51 Go to next message
Eclipse UserFriend
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 09:20] by Moderator

Re: creating operation parameters [message #1794785 is a reply to message #1794783] Thu, 06 September 2018 09:07 Go to previous messageGo to next message
Eclipse UserFriend
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 10:51 Go to previous message
Eclipse UserFriend
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: Sun Jul 27 04:59:33 EDT 2025

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

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

Back to the top