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;};
in
helper ECORE::EModelElement::getOrCreateEAnnForSource(in annsource: String): EAnnotation {
var eann: ECORE::EAnnotation := self.getEAnnotation(annsource);
if(eann=null){
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?

Thanks
Michael

[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: 115
Registered: April 2011
Senior Member
Hi

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.


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


Current Time: Thu Apr 25 08:56:19 GMT 2024

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

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

Back to the top