|
Re: Enabling Ecore OCL Constraints in GMF gmfgen [message #43861 is a reply to message #43798] |
Tue, 08 August 2006 13:41 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Madanagopal,
As Radek indicated in the GMF newsgroup, following the approach outlined in
this article will make your OCL constraints available in the generated
EValidator. AFAIK, this is entirely unrelated to GMF's mapping models and
code generation because GMF does not customize the generation of the domain
model. The article provides a fully functional example.
Radek also mentioned that the EMFT Validation component could be used to
evaluate OCL-defined constraints. In fact, in some ways, this is a simpler
approach than the code generation approach of the article. It would be
very straight-forward to implement an IConstraintProvider that, when asked
for the constraints applicable to an EObject, introspects that EObject's
EClass for annotations defining OCL invariant constraints. The constraint
provider could parse those constraints and cache them in IModelConstraint
objects, much as the OCLConstraintParser does (in the
org.eclipse.emf.validation.ocl plug-in), creating OCLModelConstraints from
expressions in the XML extension point.
HTH,
Christian
Madanagopal wrote:
> Hello,
>
> How can i point my GMF's gmfgen to invoke the OCL annotations that are
> implemented as per in the paper
> http://www.eclipse.org/articles/Article-EMF-Codegen-with-OCL /article.html.
>
> I have gathered news from the groups that Constraints generated in Ecore
> level can be invoked by the GMF's gmfgen. But OCL constraints doesnt seem
> to work for me.
>
> Can you please shed some more light on this topic.
>
> I do like to validate my model at Ecore level by having some OCL
> constraints for few classes whose functionality can also be achieved with
> Audit Rules.
>
> An Example would be most welcome. :)
>
> Regards,
> Madanagopal.
|
|
|
Re: Enabling Ecore OCL Constraints in GMF gmfgen [message #584703 is a reply to message #43798] |
Tue, 08 August 2006 13:41 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Madanagopal,
As Radek indicated in the GMF newsgroup, following the approach outlined in
this article will make your OCL constraints available in the generated
EValidator. AFAIK, this is entirely unrelated to GMF's mapping models and
code generation because GMF does not customize the generation of the domain
model. The article provides a fully functional example.
Radek also mentioned that the EMFT Validation component could be used to
evaluate OCL-defined constraints. In fact, in some ways, this is a simpler
approach than the code generation approach of the article. It would be
very straight-forward to implement an IConstraintProvider that, when asked
for the constraints applicable to an EObject, introspects that EObject's
EClass for annotations defining OCL invariant constraints. The constraint
provider could parse those constraints and cache them in IModelConstraint
objects, much as the OCLConstraintParser does (in the
org.eclipse.emf.validation.ocl plug-in), creating OCLModelConstraints from
expressions in the XML extension point.
HTH,
Christian
Madanagopal wrote:
> Hello,
>
> How can i point my GMF's gmfgen to invoke the OCL annotations that are
> implemented as per in the paper
> http://www.eclipse.org/articles/Article-EMF-Codegen-with-OCL /article.html
>
> I have gathered news from the groups that Constraints generated in Ecore
> level can be invoked by the GMF's gmfgen. But OCL constraints doesnt seem
> to work for me.
>
> Can you please shed some more light on this topic.
>
> I do like to validate my model at Ecore level by having some OCL
> constraints for few classes whose functionality can also be achieved with
> Audit Rules.
>
> An Example would be most welcome. :)
>
> Regards,
> Madanagopal.
|
|
|
Powered by
FUDForum. Page generated in 0.01940 seconds