[EMF Validation] EMF Validation Framework [message #894995] |
Wed, 11 July 2012 07:15  |
Eclipse User |
|
|
|
hi,
During the preparation of my PhD,i'm working on real time design pattern and i'm trying to implement a tool to check validity of pattern instance.
So, I create a constrainte using the EMF Validation framework to check that every class in a pattern instance must have a different name (no duplicated class names). I'm trying to applicate the validation Adapter tutorial but can't achieve any result because I can't find documentation that explain the steps to follow in order to implement constraint using DiagnosticChain interface.
Please help me.
Thank you,
|
|
|
|
|
|
Re: [EMF Validation] EMF Validation Framework [message #895026 is a reply to message #895011] |
Wed, 11 July 2012 08:48  |
Eclipse User |
|
|
|
Wiwa,
If you look in Ecore.ecore, you'll see that EPackage has an annotation
like this
<eClassifiers xsi:type="ecore:EClass" name="EPackage"
eSuperTypes="#//ENamedElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="WellFormedNsURI
WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames
UniqueNsURIs"/>
</eAnnotations>
I'm suggesting you add such an annotation to your model (the EClass for
the pattern instance) and look at your generated validator.
On 11/07/2012 2:04 PM, wiwa wiwa wrote:
> I try to apply "validateEPackage_UniqueClassifierNames" constraint,but
> it does not taken into account in the runtime application!!
> I think that the problem is the ePackage parametre because in the
> instance model all the elements are EClassifier.
> What are you saying??
|
|
|
Powered by
FUDForum. Page generated in 0.30913 seconds