Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to instantiate objects that have simple association relationships and not containment references
How to instantiate objects that have simple association relationships and not containment references [message #767638] Sun, 18 December 2011 14:50 Go to next message
Elvis Dowson is currently offline Elvis DowsonFriend
Messages: 65
Registered: December 2011
Member
Hi,
If I have a meta-model and use the default eclipse editor plugin, I find that I can only instantiate either top-level model objects, or objects under the top-level object that have a containment relationship.

Suppose I have a few related objects, I have no way to create a new child object using a simple association relationship.

Is there some way to do this, with the default EMF generated editor? Or do I have a programmatically create these related objects via a manually added menu option?

Best regards,

Elvis Dowson
Re: How to instantiate objects that have simple association relationships and not containment refere [message #767657 is a reply to message #767638] Sun, 18 December 2011 15:57 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Elvis,<br>
<br>
Comments below.<br>
<br>
On 18/12/2011 3:50 PM, Elvis Dowson wrote:
<blockquote cite="mid:jckuk4$3ts$1@news.eclipse.org" type="cite">Hi,
<br>
      If I have a meta-model and use the default eclipse editor
plugin, I find that I can only instantiate either top-level model
objects, or objects under the top-level object that have a
containment relationship. <br>
Suppose I have a few related objects, I have no way to create a
new child object using a simple association relationship.
<br>
</blockquote>
For an object to be serializeable, it must be contained directly by
a resource, or be contained (via a containment reference) by some
object that in turns is directly contained by a resource,  and so on
in terms of deeper containment nesting.<br>
<blockquote cite="mid:jckuk4$3ts$1@news.eclipse.org" type="cite">
<br>
Is there some way to do this, with the default EMF generated
editor? Or do I have a programmatically create these related
objects via a manually added menu option?
<br>
</blockquote>
You <b>have to </b>decide where new objects are contained.<br>
<blockquote cite="mid:jckuk4$3ts$1@news.eclipse.org" type="cite">
<br>
Best regards,
<br>
<br>
Elvis Dowson
<br>
<br>
</blockquote>
</body>
</html>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Insulating persisted data from changes to the Ecore model schema
Next Topic:[EMF] Create a property Listener
Goto Forum:
  


Current Time: Fri Apr 26 13:29:48 GMT 2024

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

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

Back to the top