[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Constraints in Ecore for GMF

Hello,

With reference to some previous posts https://bugs.eclipse.org/bugs/show_bug.cgi?id=143580
i am currently trying to have constraints implemented at the Ecore level.


Moreover my requirement is to validate a class Firm with an attribute "name" with constraint "self.name.size() > 0".

I have another possibility to implement this. Define an Audit Rule for this constraint and then Enable the Validation Options in .gmfgen by setting

Diagram -> Validation Decorators  to "true"
Diagram -> Valdation Enabled to "true"
Providers -> Validation Provider Priority  to "Medium".

This will generate diagram plugin which would have options Diagram-> Validate to validate my Model.

Now having constraints at Ecore level, what are the benifits that i get when i use them for GMF, since I have to deal with lots of Constraints in Design Level while writing Ecore and some in gmfmap.

Should i still have to make any changes while generating GMF Diagram Editors with having Constraints in Ecore Level.

Please Post in your Comments.
An Example or a tutorial on this topic would be really helpful.

Madanagopal.

Attachments :
1. Ecore Snapshot
2. Ecore File

Attachment: company.ecore
Description: Binary data

Attachment: ScreenHunter_31.gif
Description: GIF image