Transforming Ecore diagrams with mediniQVT [message #1695594] |
Sun, 17 May 2015 12:01  |
Eclipse User |
|
|
|
Dear Community, i dont know if this is the place of this post
I have the MoDisco Java metamodel and i need transform a plus sign in the source model in a minus sign in the target model. Is it functionally possible?
The code por this part is the following:
relation InfixExpression2InfixExpression {
tvl : String;
tvr : String;
checkonly domain sourcemodel s: java::InfixExpression {
leftOperand = sLOperand : java::NumberLiteral {
tokenValue = tvl
},
rightOperand = sROperand : java::NumberLiteral {
tokenValue = tvr
},
operator = java::InfixExpressionKind::PLUS
};
enforce domain targetmodel t: java1::InfixExpression {
leftOperand = tLOperand : java1::NumberLiteral {
tokenValue = tvl
},
rightOperand = tROperand : java1::NumberLiteral {
tokenValue = tvr
},
operator = java1::InfixExpressionKind::MINUS
};
}
I attach the qvt file and the source model. Initially, the target model don't exist, this is created after at transformation execution.
I recieve the following error at the transformation execution.
Exception occured in transformation
The value 'PLUS' is not a valid enumerator of 'InfixExpressionKind'
I don't understand what is wrong.
I hope you can help me.
Thanks.
|
|
|
|
Re: Transforming Ecore diagrams with mediniQVT [message #1695647 is a reply to message #1695594] |
Mon, 18 May 2015 07:36   |
Eclipse User |
|
|
|
Hi
This is the Eclipse QVTd newsgroup. You should try a Medini QVT
newsgroup for Medini QVT issues.
Eclipse QVTd will finally have a very preliminary QVTr and QVTc compiled
and optimized execution capability in the Mars release (June), but you
will have to wait till next year before it is suitable for more that
academic research.
In place transformations are rather hard with QVTr / QVTc that lack a
default 'copy' capability; a prototype should be avilable in Eclipse
QVTd next year.
For now I would recommend QVTo (or plain Java) for such a task.
Regards
Ed Willink
On 17/05/2015 17:01, Gonzalo Bressan Zuber wrote:
> Dear Community, i dont know if this is the place of this post
>
> I have the MoDisco Java metamodel and i need transform a plus sign in the source model in a minus sign in the target model. Is it functionally possible?
>
> The code por this part is the following:
>
> relation InfixExpression2InfixExpression {
>
> tvl : String;
> tvr : String;
>
>
> checkonly domain sourcemodel s: java::InfixExpression {
>
> leftOperand = sLOperand : java::NumberLiteral {
> tokenValue = tvl
> },
> rightOperand = sROperand : java::NumberLiteral {
> tokenValue = tvr
> },
> operator = java::InfixExpressionKind::PLUS
> };
>
> enforce domain targetmodel t: java1::InfixExpression {
>
> leftOperand = tLOperand : java1::NumberLiteral {
> tokenValue = tvl
> },
> rightOperand = tROperand : java1::NumberLiteral {
> tokenValue = tvr
> },
> operator = java1::InfixExpressionKind::MINUS
> };
> }
>
>
> I attach the qvt file and the source model. Initially, the target model don't exist, this is created after at transformation execution.
>
> I recieve the following error at the transformation execution.
>
> Exception occured in transformation
> The value 'PLUS' is not a valid enumerator of 'InfixExpressionKind'
>
> I don't understand what is wrong.
>
> I hope you can help me.
>
> Thanks.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03721 seconds