Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Parsing OCL constraints in Acceleo
Parsing OCL constraints in Acceleo [message #1815325] Mon, 30 September 2019 15:33 Go to next message
Fritz Solms is currently offline Fritz SolmsFriend
Messages: 2
Registered: July 2009
Junior Member
I have a UML model with OCL constraints and I would like to generate code from both, the UML model elements as well as from OCL constraints applied to these. The model is created with MagicDraw and the OCL expressions are contained within UML OpaqueExpressions. I would like to generate a OCLExpression from the body (text) of the OpaqueExpression in order to navigate the OCL syntax in order to map it onto code for test interceptors.

So, in a nutshell: I would like to use from within Acceleo the OclParser to generate an OclExpression from text.

Any assistance will be much appreciated.
Re: Parsing OCL constraints in Acceleo [message #1815434 is a reply to message #1815325] Wed, 02 October 2019 17:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

You may find you need to do 'nothing'.

Papyrus support UML2Ecore2Java.

Any embedded OCL within the UML should be translated to Ecore EAnnotations so that the OCL2Java functionality embeds in within your Ecore Java.
(You just need to get the Papyrus/UML configuration correct. Sorry I'm not an expert on this.)

Regards

Ed Willink

[Updated on: Wed, 02 October 2019 17:20]

Report message to a moderator

Re: Parsing OCL constraints in Acceleo [message #1815489 is a reply to message #1815434] Thu, 03 October 2019 12:41 Go to previous message
Fritz Solms is currently offline Fritz SolmsFriend
Messages: 2
Registered: July 2009
Junior Member
Thanks, Ed, for the poiinter - will try and give feedback if I managed to get things going ...

Kind regards
Fritz
Previous Topic:Error while creating Acceleo project
Next Topic:[Acceleo] A question on building product with Maven/Tycho
Goto Forum:
  


Current Time: Thu Dec 12 07:55:32 GMT 2019

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

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

Back to the top