Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » Transforming Ecore diagrams with mediniQVT(Exception thrown at the transformation execution)
Transforming Ecore diagrams with mediniQVT [message #1695593] Sun, 17 May 2015 15:56 Go to next message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member
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.

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 #1695673 is a reply to message #1695593] Mon, 18 May 2015 12:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6004
Registered: July 2009
Senior Member
Hi

Please do not use multiple newsgroups.

Answered on the QVTd newsgroup.

Regards

Ed Willink



On 17/05/2015 16:56, 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.
>
> 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 #1695674 is a reply to message #1695673] Mon, 18 May 2015 12:42 Go to previous message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member
I'm sorry.
Previous Topic:QVTo constructor behavior when extending transformations
Next Topic:[SOLVED] Generating random values
Goto Forum:
  


Current Time: Sun Aug 19 02:00:20 GMT 2018

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

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

Back to the top