Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » EMF Compare - Logical Model :: Loading dependent models (EMF Compare - Logical Model :: Explicitely loading dependent models )
icon5.gif  EMF Compare - Logical Model :: Loading dependent models [message #1455291] Wed, 29 October 2014 07:56 Go to next message
Preetam Palwe is currently offline Preetam PalweFriend
Messages: 9
Registered: October 2014
Junior Member
Hello there

I am planning to use EMF Compare as a model compare technology for my bespoke models.
I am using 3.1.0 M2 (2014/10/06 07:49) and read about the logical model documentation - which makes sense.

My question is do we have a mechanism (programmatically somewhere) to instruct EMF Compare to load all the dependent models explicitly (or in other words do not unload the dependent models as an optimization step)

I do understand the rationale behind the logical model creation and unloading of some of the dependent models which don't have any changes in them. But in my scenario this optimization is creating some issues when the compare results gets displayed.

Ah I know I am not explaining the problem properly - let me try again ...

When EMF Compare show the model elements comparison results it uses the getText() from the edit plugin (ItemProviders). In my case the getText() of some of the model elements depend up on the associated dependent models Sad
As a result of this - when EMF Compare create logical model and if the dependent model does not have any changes in them then they get unloaded and my getText() in some item providers fails
So I was keen to know can I switch off this unloading of models ?

Any response to the query is highly appreciated ...

Many Thanks !
Re: EMF Compare - Logical Model :: Loading dependent models [message #1457420 is a reply to message #1455291] Fri, 31 October 2014 09:55 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1857
Registered: July 2009
Senior Member
Hi Preetam,

We have some issues on our side too with this "not loading" of resources that don't have changes (for example, if there are changes in a "notation" model but not in the UML behind it, we only load the notation... and the display is pretty bad Smile).

What we would ultimately like to provide for extenders is a mean to hook into the "final" resource set, after the comparison is done, to forcefully load new resources in that set since it's going to be displayed. Unfortunately, this hook has not been implemented yet.

You can, however, hook into the resource set we use for the comparison, though this API is very young and might be lacking in features and stability. Please have a look into the extension point org.eclipse.emf.compare.rcp.resourceSetHook, org.eclipse.emf.compare.ide.hook.IResourceSetHook.preLoadingHook(ResourceSet, Collection<? extends URI>) might be of interest to you. This API is not available in a stable build yet, so you'll have to use one of our nightlies (install through this update site or clone the repository at git://git.eclipse.org/gitroot/emfcompare/org.eclipse.emf.compare.git )

Do note that any new resource you load in this set will be considered for comparison, so we'll iterate over it even though it has no change, slowing down the process. If you'd like to contribute a better solution (a hook called after the comparison is done, before the display), we'll gladly look at it Smile.

Laurent Goubet
Obeo
Previous Topic:Comparing UML models using a UMLPostProcessor
Next Topic:EGit and EMFCompare, set logical merge as the default merging strategy for a specific file extension
Goto Forum:
  


Current Time: Sat Jul 21 04:09:36 GMT 2018

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

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

Back to the top