Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » EMF Compare models containing "Non-Model Intermediary View Objects"
EMF Compare models containing "Non-Model Intermediary View Objects" [message #998604] Thu, 10 January 2013 10:37 Go to next message
Dr. RossiFriend
Messages: 2
Registered: January 2013
Junior Member
I am trying to compare 2 models using EMF CompareUI release 2.1M4.

For my custom model I have created an editor containing "Non-Model Intermediary View Objects". These objects are more or less vitual folders containing the real eCore objects. The whole concept is described in the "EMF - Eclipse Modeling Framework - Second Edition - chapter 19.2.3". This works fine.

When I try to compare the model objects, for a standard object the custom editor is opened in a TreeContentMergeViewer using my custom editor. But when I select a feature that is contained within a "Non-Model Intermediary View Object", a default text compare editor is used, that contains the wrong data.

As far as I understand the problem is, that the CompareUI is unable to determine the correct content type from the ITypedElement for the parent "Non-Model Intermediary View Object" (see CompareUIPlugin.getCommonType() and CompareUIPlugin.getTypes() ). So it uses ITypedElement.TEXT_TYPE as fallback content type instead.

My question is, how can I display a TreeContentMergeViewer using my custom editor, when "Non-Model Intermediary View Objects" are used:

A) Is it a bug in CompareUI?

B) In order to diplay my custom editor, should my "Non-Model Intermediary View Objects" return ITypedElement.FOLDER_TYPE as their type? How do I do that?

C) Do I have to override e.g. DiffElement in order make CompareUI determine the real ecore parent or correct type? If yes, what do I have exactly to do?


Thanks for your help...
Re: EMF Compare models containing "Non-Model Intermediary View Objects" [message #1004581 is a reply to message #998604] Wed, 23 January 2013 13:55 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

You got most of this right : CompareUI cannot find the proper content type for your "virtual" objects.

Seen from afar, this does not look like a bug : unknown types fall back to text comparison. However, it is probably the responsibility of EMF Compare to set correct content-types for these special model elements. Could you raise an enhancement request on the buzilla with two models that will allow us to reproduce the use case.

We will need to make sure the UI is extensible enough for users to add their own content types for their own elements, but this case seems like something that should go in the generic code base.

Laurent Goubet
Obeo

[Updated on: Wed, 23 January 2013 13:55]

Report message to a moderator

Previous Topic:How to integrate emf compare with eclipse team support?
Next Topic:EMF Compare bugzilla change
Goto Forum:
  


Current Time: Tue Mar 19 10:41:43 GMT 2024

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

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

Back to the top