Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Enumeration Type in MediniQVT(Exception occured in transformation)
Enumeration Type in MediniQVT [message #1694369] Mon, 04 May 2015 21:44 Go to next message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member
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 16:02 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
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.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Enumeration Type in MediniQVT [message #1694511 is a reply to message #1694495] Tue, 05 May 2015 19:37 Go to previous messageGo to next message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member
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 19:45 Go to previous message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member
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: Fri Apr 19 09:19:52 GMT 2024

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

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

Back to the top