|
Re: Problem: Pasting Non Containment References when withInverseElist is true. [message #425621 is a reply to message #425619] |
Wed, 03 December 2008 13:49 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Hi, Robert,
This is a question for the GMF newsgroup, so I copy my reply, there.
This looks like GMF fixed a bug in the Ganymede release. Bidirectional
associations, generally, should not be copied and pasted because that
will cause the referenced objects to be modified, acquiring references
to the newly pasted objects. Usually, one expects only the object into
which the paste is to be performed to have any changes. Anything else
is surprising to the user.
Of course, your application may have a special need in this case. I'm
not sure whether the API allows you to provide an override of the
PasteIntoParentOperation to customize this behaviour. Hopefully,
someone more knowledgeable in GMF can help you with that ...
Cheers,
Christian
Robert Moloney wrote:
> Hi,
>
> I recently upgraded to Ganymede from Europa. Copy and paste in my GMF
> editor doesn't behave the same anymore.
>
> The copied object has a non containment reference to another model's
> object.
> The list, the object is contained within is a
> EObjectWithInverseResolvingEList.
> In Ganymede the code below removes the object from the list of objects
> to be pasted.
>
> PasteIntoParentOperation:
> private void resolveLocalProxies(EObject eObject) {
> ...
> boolean withInverseElist = (collection instanceof
> EObjectWithInverseEList);
> ...
> } else if (withInverseElist) {
> collection.remove(eObj);
> }
> ...
> }
> }
> }
>
> In Europa the reference was not removed from the list of objects to be
> pasted.
>
> Can I get the code to return to the original behaviour?
>
> Cheers
>
> Rob
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03338 seconds