Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Using Acceleo OCL or AQL for constraints outside Sirius
Using Acceleo OCL or AQL for constraints outside Sirius [message #1766286] Mon, 19 June 2017 22:01 Go to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
I've been using the "standard" OCL support of Ecore for constraints for some time, i.e. the technique where you add a validationDelegate annotation to the package with the providers URI as the value. Now that I'm using Sirius more often, I'm considering a switch to using Acceleo as the OCL engine or perhaps AQL. Is that possible, do these expression language implementations support the Ecore's delegation mechanism? If not, wouldn't that be a good idea? The same goes for derived values and operations.
Re: Using Acceleo OCL or AQL for constraints outside Sirius [message #1766303 is a reply to message #1766286] Tue, 20 June 2017 07:21 Go to previous messageGo to next message
Yvan Lussaud is currently offline Yvan LussaudFriend
Messages: 63
Registered: July 2009
Member
This feature is implemented it should work out of the box in Eclipse. For standalone you will need to register delegates by hand.

http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/tree/query/tests/org.eclipse.acceleo.query.tests/src/org/eclipse/acceleo/query/ast/test/delegates/DelegateUtilsTests.java

In this test clas you have an example of Ecore model with delegates. The model is created programmaticaly but you should find needed information.

For standalone use the following check the registration of delegates factories (you should register them by hand if needed):

http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/tree/query/tests/org.eclipse.acceleo.query.ide.tests/src/org/eclipse/acceleo/query/ide/tests/delegates/DelegatesRegistrationTests.java

Re: Using Acceleo OCL or AQL for constraints outside Sirius [message #1766325 is a reply to message #1766303] Tue, 20 June 2017 08:46 Go to previous message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
That's great! From the test code I assume http://www.eclipse.org/acceleo/query/1.0 is used as the identifier. Is there also an identifier for the MTL (OCL) interpreter?
Previous Topic:Rotatable nodes/images
Next Topic:Contained figure resize
Goto Forum:
  


Current Time: Tue Apr 23 08:37:49 GMT 2024

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

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

Back to the top