Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Parsing OCL constraints in Acceleo
Parsing OCL constraints in Acceleo [message #1815325] Mon, 30 September 2019 11:33 Go to next message
Eclipse UserFriend
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 13:20 Go to previous messageGo to next message
Eclipse UserFriend
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 13:20] by Moderator

Re: Parsing OCL constraints in Acceleo [message #1815489 is a reply to message #1815434] Thu, 03 October 2019 08:41 Go to previous message
Eclipse UserFriend
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: Sun Jun 22 10:33:01 EDT 2025

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

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

Back to the top