Skip to main content



      Home
Home » Modeling » Epsilon » replace object without
replace object without [message #1791501] Sun, 01 July 2018 04:38 Go to next message
Eclipse UserFriend
Hi,

Is it possible to replace an object in a model by a sister object(their classes have a common supertype), without knowing their container class?

A small example:
So A1, A2, A3, ..., Ai has a containment relation to B.
B is an abstract class.
C and D extends B.
And if an C exist then it should be replaced by D, without defining in which container C resides.

Also in my case the number of containers (e.g. A1, A2, etc) is quite large, so it would help to have a general solution.

Thanks in advance,

Michiel
Re: replace object without [message #1791516 is a reply to message #1791501] Sun, 01 July 2018 12:40 Go to previous message
Eclipse UserFriend
Hi Michiel,

The main challenge with replacing an EObject is that all other EObjects that point to it (through containment and non-containment EReferences) need to be updated as well. This should be possible using the reflective EMF API but I'm not aware of an out-of-the-box solution.

Cheers,
Dimitris
Previous Topic:EpsilonBook.pdf
Next Topic:Reading text file in EOL/EGL
Goto Forum:
  


Current Time: Wed Jul 23 16:32:56 EDT 2025

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

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

Back to the top