Skip to main content


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 15:28 Go to next message
No real name is currently offline No real nameFriend
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 15:06 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
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 15:11 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
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 16:25 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
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 07:59 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
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 15:49 Go to previous message
No real name is currently offline No real nameFriend
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 15:50]

Report message to a moderator

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


Current Time: Sat Apr 20 04:28:28 GMT 2024

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

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

Back to the top