Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF compare](ignore an attribute)
[EMF compare] [message #664383] Fri, 08 April 2011 11:28 Go to next message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member

hey,

I want to ignore the comparison of an attribute and its sub attributes, I think to use shouldBeIgnored (Eattributre) but I dont know how?

Re: [EMF compare] [message #664951 is a reply to message #664383] Tue, 12 April 2011 11:06 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1621
Registered: July 2009
Senior Member
You have to create your own implementation of an org.eclipse.emf.compare.diff.engine.GenericDiffEngine (simply extend the Generic one), and override its "getAttributeChecker' so that it returns your own implementation of the org.eclipse.emf.compare.diff.engine.check.AttributesCheck class, where you will override the "shouldBeIgnored(EAttribute)" method.

After that, override the "org.eclipse.emf.compare.diff.engine" extension point and provide your own engine to EMF Compare.

Laurent Goubet
Obeo
Re: [EMF compare] [message #664955 is a reply to message #664951] Tue, 12 April 2011 11:11 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member
thx Laurent,

I'll try that .
Re: [EMF compare] [message #665450 is a reply to message #664955] Thu, 14 April 2011 12:25 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member
Hi Laurent,

how can I recover the attribute to pass it as parameter in the method shouldbeignored (Eattribute) ?
Re: [EMF compare] [message #665589 is a reply to message #664383] Fri, 15 April 2011 03:59 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1621
Registered: July 2009
Senior Member
Hi,

You do not call shouldBeIgnored. The EMF Compare core will call this method. You only override it and return either
true
or
false
for the EAttribute you are provided.

Laurent Goubet
Obeo
Re: [EMF compare] [message #665726 is a reply to message #665589] Fri, 15 April 2011 11:49 Go to previous message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member
HI,

Attributes are ignored in case of change, only. Once an attribute is added or deleted, its ignorance is restricted.

[Updated on: Fri, 15 April 2011 11:50]

Report message to a moderator

Previous Topic:[teneo] Hibernate Interceptor
Next Topic:HBSessionDataStore.initialize() / reinitialize?
Goto Forum:
  


Current Time: Tue Jul 29 17:12:13 EDT 2014

Powered by FUDForum. Page generated in 0.03491 seconds