[EMF Compare]comparison of a copied model shows differences in data types [message #532386] |
Sun, 09 May 2010 09:04  |
Eclipse User |
|
|
|
Hello NG,
I make a copy of my original model with the following code:
Copier copier = new Copier(false, false);
List<EObject> originalElements = new LinkedList<EObject>();
originalElements.add(originalModel);
copier.copyAll(originalElements);
copier.copyReferences();
EObject copiedModel = copier.get(originalModel);
Then I invoke some modifications on the copy and display a comparison
dialog between original and copy. I observed a very strange thing which
I want to solve. Imagine that original and copy is an ecore model. The
strange thing now is that elements which belong together and are still
the same (except of being duplicates) are surrounded by a blue line
expressing they are similar but differ in some way. When I then opend
the properties tab in the compare dialog I saw the reason: the copied
model doesn't reference the original data types, such as EDouble,
EString ...., anymore. And that's why the comparison assumes that they
have differences. But why are those references to the data types broken?
I understand that those data types can't be copied but the references
should hold in the copy as well. Any suggestions?
best regards,
Jan
|
|
|
|
|
Re: [EMF Compare]comparison of a copied model shows differences in data types [message #622863 is a reply to message #532386] |
Sun, 09 May 2010 13:05  |
Eclipse User |
|
|
|
Jan,
It sounds like you don't really want the second argument to the Copier
to be false.
Jan Reimann wrote:
> Hello NG,
> I make a copy of my original model with the following code:
>
> Copier copier = new Copier(false, false);
> List<EObject> originalElements = new LinkedList<EObject>();
> originalElements.add(originalModel);
> copier.copyAll(originalElements);
> copier.copyReferences();
> EObject copiedModel = copier.get(originalModel);
>
> Then I invoke some modifications on the copy and display a comparison
> dialog between original and copy. I observed a very strange thing which
> I want to solve. Imagine that original and copy is an ecore model. The
> strange thing now is that elements which belong together and are still
> the same (except of being duplicates) are surrounded by a blue line
> expressing they are similar but differ in some way. When I then opend
> the properties tab in the compare dialog I saw the reason: the copied
> model doesn't reference the original data types, such as EDouble,
> EString ...., anymore. And that's why the comparison assumes that they
> have differences. But why are those references to the data types broken?
> I understand that those data types can't be copied but the references
> should hold in the copy as well. Any suggestions?
>
> best regards,
> Jan
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.26307 seconds