Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Copy paste
Copy paste [message #428920] Thu, 02 April 2009 00:06 Go to next message
Uri Shani is currently offline Uri ShaniFriend
Messages: 18
Registered: July 2009
Junior Member
I use a model in which most references are bidirectional. This is useful
for many editing purposes, yet it seems to prevent copy paste of most of
the elements in the model. Is this indeed so, or I am missing something?

Thanks,
- Uri
Re: Copy paste [message #428922 is a reply to message #428920] Thu, 02 April 2009 00:21 Go to previous message
Ed Merks is currently online Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Uri,

Comments below.

Uri Shani wrote:
> I use a model in which most references are bidirectional.
They're something that should be used with a bit of caution. All too
often they seem useful when in fact they're inappropriate. For example,
EClass.eSuperTypes is not bidirectional even thought it would clearly be
useful for a class to know all its subclasses.
> This is useful for many editing purposes, yet it seems to prevent copy
> paste of most of the elements in the model. Is this indeed so, or I am
> missing something?
If you copy an object with a bidirectional reference to another object,
that reference will be copied if and only if the referenced object is
also copied. Otherwise, the original object would refer back to the
copy and the act of copying would hence have a side-effect on the
original. Copying needs to be side-effect free...
>
> Thanks,
> - Uri
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:create an instance of association in EMF
Next Topic:Using common external resources
Goto Forum:
  


Current Time: Fri Apr 26 06:05:47 GMT 2024

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

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

Back to the top