Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » replace object without
replace object without [message #1791501] Sun, 01 July 2018 08:38 Go to next message
Michiel Fortuin is currently offline Michiel FortuinFriend
Messages: 9
Registered: May 2018
Junior Member

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,

Re: replace object without [message #1791516 is a reply to message #1791501] Sun, 01 July 2018 16:40 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1610
Registered: July 2009
Location: York, UK
Senior Member

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.

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

Current Time: Wed Nov 14 17:13:16 GMT 2018

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

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

Back to the top