Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Compare] Comparing methods
[Compare] Comparing methods [message #102187] Fri, 09 November 2007 13:22 Go to next message
Eclipse UserFriend
Originally posted by: brtnik.802.cz

Hello!

I'd like to ask if is (or will be) some possibility to influence comparing
emf objects. For example lets have two objects : A{property p1 = 1,p2 =1;}
B{property p1 = 1,p2 =2;}
In first case I want to compare all properties , so result will be : object
are not similar.
In second case I want to compare only against first property , so result
will be : object are similar.

I've looked in org.eclipse.emf.compare.match.statistic.DifferencesServices.
Also, I tried to extend class to override some methods like isSimilar, but
it seems to be not optimal way.

Thank you in advance!
Re: [Compare] Comparing methods [message #102247 is a reply to message #102187] Fri, 09 November 2007 15:23 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030604010707060008080707
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Ivo,

Well in fact, method "DifferencesServices#isSimilar" is accessible for
this kind of needs, just call super.isSimilar() for the objects you
don't want to be compared by their first property ;).

You will then have to extend the extension point
"org.eclipse.emf.compare.match.engine" to have your match engine used.

I you can think of a better way to alter the way objects are detected as
similar, do not hesitate to give us your thoughts :).

Regards,
Laurent Goubet
Obeo

Ivo Hajducek a
Re: [Compare] Comparing methods [message #612430 is a reply to message #102187] Fri, 09 November 2007 15:23 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030604010707060008080707
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Ivo,

Well in fact, method "DifferencesServices#isSimilar" is accessible for
this kind of needs, just call super.isSimilar() for the objects you
don't want to be compared by their first property ;).

You will then have to extend the extension point
"org.eclipse.emf.compare.match.engine" to have your match engine used.

I you can think of a better way to alter the way objects are detected as
similar, do not hesitate to give us your thoughts :).

Regards,
Laurent Goubet
Obeo

Ivo Hajducek a
Previous Topic:[Announce] Ecore Diagram Component Proposal
Next Topic:[CDO] how to handle object update conflicts
Goto Forum:
  


Current Time: Fri Nov 08 22:23:13 GMT 2024

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

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

Back to the top