Skip to main content



      Home
Home » Modeling » Compare » [EMF Compare] Exchange ScopeProvider in UI plugin
[EMF Compare] Exchange ScopeProvider in UI plugin [message #1060789] Tue, 28 May 2013 08:41 Go to next message
Eclipse UserFriend
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 11:36 Go to previous messageGo to next message
Eclipse UserFriend
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 03:31 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 04:34:25 EDT 2025

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

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

Back to the top