Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF Validation] EMF Validation Framework
[EMF Validation] EMF Validation Framework [message #894995] Wed, 11 July 2012 11:15 Go to next message
wiwa wiwa is currently offline wiwa wiwaFriend
Messages: 12
Registered: May 2012
Junior Member
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 #895001 is a reply to message #894995] Wed, 11 July 2012 11:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
You're reposting essentially the same question. More comments below.

On 11/07/2012 1:15 PM, wiwa wiwa wrote:
> 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).
Have you tried adding a named constraint to the Ecore model for this
"pattern instance EClass" as I suggested previously?
> 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.
The problem is that no one is maintaining the extended validation
framework nor is anyone familiar with it monitoring the newsgroup/forum
to answer questions about it. I can help you get the core validation
support working, but I don't have the resource to help with the extended
validation framework. So you can either try what I suggest or, it
appears, you're basically on your own and will have to figure it out
with what little is available.
>
> Please help me.
>
> Thank you,


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EMF Validation] EMF Validation Framework [message #895011 is a reply to message #895001] Wed, 11 July 2012 12:04 Go to previous messageGo to next message
wiwa wiwa is currently offline wiwa wiwaFriend
Messages: 12
Registered: May 2012
Junior Member
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??
Re: [EMF Validation] EMF Validation Framework [message #895012 is a reply to message #894995] Wed, 11 July 2012 12:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Depending on the complexity of what you're checking and the efficiency
you need, you might find using OCL or rather OCLinEcore.

Alternatively, recent Papyrus activity has extended EMFv, so you might
try asking on that group.

Regards

Ed Willink


On 11/07/2012 12:15, wiwa wiwa wrote:
> 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 12:48 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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??


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:What's a good way of serializing/deserializing models with embedded EPackage
Next Topic:Efficiently Traversing an Entire EMF Model
Goto Forum:
  


Current Time: Fri Mar 29 09:57:09 GMT 2024

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

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

Back to the top