Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » [EMF Compare] Exchange ScopeProvider in UI plugin
[EMF Compare] Exchange ScopeProvider in UI plugin [message #1060789] Tue, 28 May 2013 12:41 Go to next message
Simon Schwichtenberg is currently offline Simon SchwichtenbergFriend
Messages: 126
Registered: September 2011
Senior Member
Hi,

I am implementing a customized MatchEngine for uml models that bases on EMF compare 1.3. The engine should ignore Packages, but should compare all Classes within all Packages. In the models I want to compare there are no nested Packages. So the engine should compare the models as if all Classes would be on the root level.

After reading the dev doc, I came up with the idea to override the scopeprovider, but I can't see how I could exchange it without copying nearly all of the code from the GenericMatchEngine.

My idea is to set the MatchOptions.OPTION_MATCH_SCOPE_PROVIDER in the optionsMap, but I cannot override the private field org.eclipse.emf.compare.match.engine.GenericMatchEngine.structuredOptions. Even the updateSetting()-method cannot be used.

What is the intended way to exchange the scopeprovider?

Re: [EMF Compare] Exchange ScopeProvider in UI plugin [message #1060843 is a reply to message #1060789] Tue, 28 May 2013 15:36 Go to previous messageGo to next message
Simon Schwichtenberg is currently offline Simon SchwichtenbergFriend
Messages: 126
Registered: September 2011
Senior Member
I guess I can't use the scopeprovider anyway, because when the package is not in the scope, the contents are also not in the scope.
Re: [EMF Compare] Exchange ScopeProvider in UI plugin [message #1060921 is a reply to message #1060843] Wed, 29 May 2013 07:31 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1638
Registered: July 2009
Senior Member
Hi,

You are hitting one of the limitations of EMF Compare 1 head-on. You have to keep the packages within the scope for their content to be matched. However, you might be able to set your engine up to ignore all references of your package, effectively ignoring all differences on it. You can do so by overriding the GenericDiffEngine and providing your own attribute/reference checker from the appropriate getter.

If you can switch to EMF Compare 2, the scoping mechanism allows you to easily change what EObjects should be considered for comparison, without restriction.

Laurent Goubet
Obeo
Previous Topic:org.eclipse.emf.compare singleton bundle?
Next Topic:UnmatchElement List vs total
Goto Forum:
  


Current Time: Wed Nov 26 20:50:43 GMT 2014

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

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