[EMF Compare] DefaultMerger and dangling references... [message #519935] |
Wed, 10 March 2010 09:46 |
Eclipse User |
|
|
|
Originally posted by: mail.andreasscharf.com
Hi,
while I was stepping through the DefaultMerger I got a bit confused
about the method removeDanglingReferences(EObject deletedObject). Am I
wrong or does this method delete arbitrary crossreferences from either
the root, resource or resourceSet? Because there are other resources
contained in the same resourceSet as the compare stuff, I noticed that
this code tried to delete some objects which doesn't have anything to
do with the deleted object.
Can you confirm this behavior?
Best regards,
Andreas
|
|
|
Re: [EMF Compare] DefaultMerger and dangling references... [message #520127 is a reply to message #519935] |
Thu, 11 March 2010 09:13 |
|
This is a multi-part message in MIME format.
--------------040604010608090706040401
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Andreas,
This method is meant to delete all references still pointing towards the
deleted EObject, and it will indeed look in all resources contained in
the same resourceSet as the deleted object's resource.
That said, that code is pretty generic and deletes all references to
objects that are no longer contained in a resource (which is the result
of using EcoreUtil.remove()). It is possible that we remove objects with
no relation to the deleted element, yet it should be elements that have
no longer reason to be referenced. Do you have an example of us removing
important references?
Laurent Goubet
Obeo
Andreas Scharf wrote:
> Hi,
>
> while I was stepping through the DefaultMerger I got a bit confused
> about the method removeDanglingReferences(EObject deletedObject). Am I
> wrong or does this method delete arbitrary crossreferences from either
> the root, resource or resourceSet? Because there are other resources
> contained in the same resourceSet as the compare stuff, I noticed that
> this code tried to delete some objects which doesn't have anything to do
> with the deleted object.
>
> Can you confirm this behavior?
>
> Best regards,
> Andreas
--------------040604010608090706040401
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr">Obeo</a>
email;internet:laurent.goubet@obeo.fr
url:http://www.obeo.fr
version:2.1
end:vcard
--------------040604010608090706040401--
|
|
|
Powered by
FUDForum. Page generated in 0.03018 seconds