Skip to main content



      Home
Home » Modeling » OCL » Complete OCL in Autogenerated Ecore editor
Complete OCL in Autogenerated Ecore editor [message #1750274] Mon, 19 December 2016 07:30 Go to next message
Eclipse UserFriend
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 09:27 Go to previous message
Eclipse UserFriend
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: Wed Jul 16 22:51:11 EDT 2025

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

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

Back to the top