Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Complete OCL in Autogenerated Ecore editor
Complete OCL in Autogenerated Ecore editor [message #1750274] Mon, 19 December 2016 12:30 Go to next message
Arunkumar Ramaswamy is currently offline Arunkumar RamaswamyFriend
Messages: 57
Registered: April 2014
Member
Hello

I am trying to add contraints to my ecore metamodel using ocl. I could add the invariants using the OclInEcore editor. But, I want to add as a separate complete ocl file. I am confused how to do this. I created a separate ocl file and while creating the model instance, I can load this file and do the validating. But I dont want the user do this step.
I want the validation embedded in the autogenerated model editor tool.

Any help much appreciated.
Re: Complete OCL in Autogenerated Ecore editor [message #1750282 is a reply to message #1750274] Mon, 19 December 2016 14:27 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

I am not sure why you have asked the same question under three different titles. Perhaps the Forum is playing up again ....

It seems you have found both ways to work. The OCL tooling generation uses an MWE2 script for auto-generation and one of the steps is a merge of Pivot.ecore and Pivot.ocl so that they are generated as if written as an OCLinEcore file.

The relevant internal code is in org.eclipse.ocl.examples.build.utilities.ConstraintMerger. Unfortunately provision of a friendly public API is one of many outstanding Bugzillas [1].

The extensibility of the merge has been debugged in M4 so that QVTd *.ecore and *.ocl are merged too. Quite a few bugs and stupidities were rectified, so look at the latest GIT code, not at the Neon releases.

Regards

Ed Willink

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=500551
Previous Topic:Complete ocl file in Ecore editor
Next Topic:[Announce] OCL 6.1.2 and 6.2.2 for Neon
Goto Forum:
  


Current Time: Sun May 05 08:45:29 GMT 2024

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

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

Back to the top