Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352727 - Make StatisticBasedSimilarityChecker.hasSameUri(EObject, EObject) protected
Summary: Make StatisticBasedSimilarityChecker.hasSameUri(EObject, EObject) protected
Status: CLOSED FIXED
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 07:42 EDT by Victor Roldan Betancort CLA
Modified: 2011-07-21 11:31 EDT (History)
2 users (show)

See Also:


Attachments
patch v1 (36.92 KB, patch)
2011-07-21 08:35 EDT, Victor Roldan Betancort CLA
laurent.goubet: iplog+
laurent.goubet: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Roldan Betancort CLA 2011-07-21 07:42:56 EDT
hasSameURI method determines if 2 EObjects have the same uri fragment, this means, they are located in the same place in an equally equivalent tree structure.

This method doesn't seem to work well with CDOObject, because URI fragments contain an UUID called CDOID, so this method returns always false, and decreases the chances of 2 objects to be matched accordding to the heuristics at StatisticBasedSimilarityChecker.

My proposal is to make this method protected so it can be overriden upon subclassing of StatisticBasedSimilarityChecker.
Comment 1 Victor Roldan Betancort CLA 2011-07-21 07:44:34 EDT
Guys, I was planning to provide a patch. I synced with CVS HEAD, but found that plugins are still versioned to 1.1.1.qualifier. Is this an error, or is it expected to be like that?
Comment 2 Victor Roldan Betancort CLA 2011-07-21 08:35:03 EDT
Created attachment 200083 [details]
patch v1

- changed visibility of StatisticBasedSimilarityChecker.hasSameUri() from private to protected
Comment 3 Laurent Goubet CLA 2011-07-21 08:51:25 EDT
Victor,

The development of EMF Compare no longer take place on CVS, but on Git. You can find information about the repository on http://wiki.eclipse.org/EMF_Compare/Contributor_Guide#Checking_out_the_code .

The git repository of EMF Compare is also replicated on github : https://github.com/eclipse/emf.compare
Comment 4 Victor Roldan Betancort CLA 2011-07-21 08:52:31 EDT
Argh, I patched too fast :P Don't know how to use Git, but will be a pleasure to learn how to :)

(In reply to comment #3)
> Victor,
> 
> The development of EMF Compare no longer take place on CVS, but on Git. You can
> find information about the repository on
> http://wiki.eclipse.org/EMF_Compare/Contributor_Guide#Checking_out_the_code .
> 
> The git repository of EMF Compare is also replicated on github :
> https://github.com/eclipse/emf.compare
Comment 5 Laurent Goubet CLA 2011-07-21 08:55:41 EDT
I think I can use the patches against CVS : the patch is small enough, and the code of this class hasn't changed so much that the patch cannot be applied.

I'll come back to you if the patch cannot be applied on the current Git HEAD ;).
Comment 6 Victor Roldan Betancort CLA 2011-07-21 08:57:10 EDT
It's no problem, it is a good excuse to play with git! ;)
Comment 7 Laurent Goubet CLA 2011-07-21 11:30:40 EDT
Thanks, this has now been pushed on master.