Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Modified parameter 'self' is input only
Modified parameter 'self' is input only [message #1715287] Sat, 21 November 2015 00:16 Go to next message
Sivka Burka is currently offline Sivka BurkaFriend
Messages: 2
Registered: November 2014
Junior Member
Hi Guys

I am exercising with qvto and not sure why qvto editor reports "Modified parameter 'self' is input only" for
self.eAnnotations += object ECORE::EAnnotation{ source :=annsource;};
helper ECORE::EModelElement::getOrCreateEAnnForSource(in annsource: String): EAnnotation {
var eann: ECORE::EAnnotation := self.getEAnnotation(annsource);
self.eAnnotations += object ECORE::EAnnotation{ source :=annsource;};
return eann;
My expectation was that it is possible to modify self content in helper (...but not in query?). Am I missing something?


[Updated on: Sat, 21 November 2015 18:04]

Report message to a moderator

Re: Modified parameter 'self' is input only [message #1715422 is a reply to message #1715287] Mon, 23 November 2015 13:44 Go to previous message
Christopher Gerking is currently offline Christopher GerkingFriend
Messages: 103
Registered: April 2011
Senior Member

The 'self' parameter is read-only by default. An explicit 'inout' declaration should do the trick, but Eclipse QVTo seems to support that only for mappings, not for helpers.

helper inout ECORE::EModelElement::getOrCreateEAnnForSource(in annsource: String): EAnnotation {...} 

Instead, try converting your helper to a mapping, or pass the EModelElement as a trailing parameter.

Previous Topic:Tracing QVT interpreter
Next Topic:Run multiple transformations in parallel
Goto Forum:

Current Time: Mon May 23 18:25:55 GMT 2022

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

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

Back to the top