Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMove functionality from QVTo to a library.
https://www.eclipse.org/forums/index.php/mv/msg/348942/866333/#msg_866333
The main problem is how to pass transformation parameter (z) to library method.
my qvto is as below and I would like to move somehelper() to library, so that I can call from other qvtos
modeltype X "strict" uses '.../X';
modeltype Y "strict" uses '.../Y';
modeltype Z "strict" uses '.../Z';
transformation X2Y(in x : Y, out y : Y, out z : Z);
main(){
x.objectsOfType(X::X1).map toY1();
}
mapping X::X1::toY1() : Y:Y1
{
name := self.name;
somehelper('test',self.resolveone(X::ABC));
}
helper somehelper(str1:String, obj : OclAny)
{
var keyName:String := getKeyName(obj); //this is black box function.
var z1 := object Z::z1@z{};
z1.name := 'z1name';
var z2 := object Z::z2@z{
name := keyName;
};
return;
}
I tried adding a property as below in library and assigning value from transformation, this is not working because it treats as a different type.
Please help me with details as I am new to QVTO transformation.
Thanks in advance,
Satya]]>Satya Muddu2012-04-30T21:05:03-00:00