Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Simple constraint using OCL(Need help)
Simple constraint using OCL [message #1740062] Mon, 08 August 2016 11:20 Go to next message
Eclipse UserFriend
Hi,

I have a class called Ontology it has a reference to a class called OntologyDescription.

I want to have a constraint saying that Ontology can only have exactly 1 OntologyDescription.

in the gmfmap I already added
Audit Container
- Audit Rule
- - Constraint
self.ontologyDescription->size()=1
- - Domain Element Target Ontology

in the gmfgen I already set the Validation Decorator and Validation Enabled to true. and then regenerated the diagram. But when I run the diagram, the validation didnt say anything about not having any OntologyDescription.

Any idea where should i look?
Re: Simple constraint using OCL [message #1745626 is a reply to message #1740062] Thu, 13 October 2016 11:03 Go to previous message
Eclipse UserFriend
Hi,

did you follow all steps from https://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial/Part_2#Validation ?

You could also use Epsilon EVL or OCLinEcore. It is important to select Validate from the edit menu in order to run the validation. You could also modify the code generation templates to invoke the validate action on save of the diagram.

Ralph
Previous Topic:Generate Code Back From Diagram
Next Topic:Sequence diagram with GMF?
Goto Forum:
  


Current Time: Sun Jul 13 00:10:51 EDT 2025

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

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

Back to the top