Skip to main content



      Home
Home » Modeling » MoDisco » Enumeration Type in MediniQVT(Exception occured in transformation)
Enumeration Type in MediniQVT [message #1694369] Mon, 04 May 2015 17:44 Go to next message
Eclipse UserFriend
Dear community

I'm developing my grade thesis in Computer Science and this is based in the use of mediniQVT for transform Java source code. I have the Java metamodel definied and i need replace a plus sign for a minus sign. Is it possible?

The source code for 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 recieve the following error at the transformation execution.

Exception occured in transformation
The value 'PLUS' is not a valid enumerator of 'InfixExpressionKind'

Thanks.
Re: Enumeration Type in MediniQVT [message #1694495 is a reply to message #1694369] Tue, 05 May 2015 12:02 Go to previous messageGo to next message
Eclipse UserFriend
Hello,
If you are using the MoDisco Java metamodel, then PLUS do is a enum literal from the InfixExpressionKind enum (cf. screenshot below).
index.php/fa/21724/0/
Thus your problem is probably coming from the transformation itself.
Re: Enumeration Type in MediniQVT [message #1694511 is a reply to message #1694495] Tue, 05 May 2015 15:37 Go to previous messageGo to next message
Eclipse UserFriend
Hello Hugo, thanks for you time...

I know that the PLUS enumeration belongs to java metamodel, but the relation is defined identically to others in the class.

Regards.
Re: Enumeration Type in MediniQVT [message #1694512 is a reply to message #1694511] Tue, 05 May 2015 15:45 Go to previous message
Eclipse UserFriend
I think my question is right there, i don't know because this is happening.

Regards.
Previous Topic:Running Modisco discoverer programmatically and standalone
Next Topic:MoDisco used/referenced in/from the ARTIST Open Source Release for Cloud migration
Goto Forum:
  


Current Time: Wed May 21 02:06:52 EDT 2025

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

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

Back to the top