Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] DefaultMerger and dangling references...
[EMF Compare] DefaultMerger and dangling references... [message #519935] Wed, 10 March 2010 09:46 Go to next message
Eclipse UserFriend
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 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
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--
Previous Topic:EMFT Texo: generating true java pojos from ecore/xsd, with runtime model support, XMI/XML (de-)seria
Next Topic:[EMF Compare] DefaultMerger and dangling references...
Goto Forum:
  


Current Time: Thu Mar 28 19:02:29 GMT 2024

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

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

Back to the top