Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Non-containment references EMF reflective model editor
Non-containment references EMF reflective model editor [message #481985] Tue, 25 August 2009 00:34 Go to next message
Tee Bee is currently offline Tee BeeFriend
Messages: 18
Registered: July 2009
Junior Member
Hi!

I wonder whether someone could help me with some insight regarding
instantiation of a meta model class that is referred merely with the use
of a non-containment reference in the emf reflective model editor?

Consider a meta model (pure .ecore file) consisting of three classes:
House, Room and Type. House is composed of Rooms (containment reference),
and has a type of Type (non-containment reference). Moreover, making a
dynamic instance of the House class and thus instances of Room using the
reflective model editor work great! However, I have not found any way of
creating an instance of the Type class and associate it with my House
class, due to the Type class not being contained by House.

Any ideas how I can create my Type instance in the model?

All help is highly appreciated!
Re: Non-containment references EMF reflective model editor [message #482031 is a reply to message #481985] Tue, 25 August 2009 07:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33217
Registered: July 2009
Senior Member
Tee,

It's best to use the EMF newsgroup for questions about EMF's core
frameworks. I've added it to the "to" list of the reply.

More comments below.



Tee Bee wrote:
> Hi!
>
> I wonder whether someone could help me with some insight regarding
> instantiation of a meta model class that is referred merely with the
> use of a non-containment reference in the emf reflective model editor?
There was a very similar question to this on the EMF newsgroup just
yesterday. You might want to have a look at the thread "containment or
reference -> consequences in generated Editor commands"
>
> Consider a meta model (pure .ecore file) consisting of three classes:
> House, Room and Type. House is composed of Rooms (containment
> reference), and has a type of Type (non-containment reference).
> Moreover, making a dynamic instance of the House class and thus
> instances of Room using the reflective model editor work great!
> However, I have not found any way of creating an instance of the Type
> class and associate it with my House class, due to the Type class not
> being contained by House.
>
> Any ideas how I can create my Type instance in the model?
You'd need to create an instance of Type in a separate resource where it
would be the root object of the resource. Then in the resource for the
House, you could use Load Resource... to load the resource that defines
a/the type. Once loaded, you'd be able to refer to that Type in the
properties view for the House.
>
> All help is highly appreciated!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Non-containment references EMF reflective model editor [message #482072 is a reply to message #482031] Tue, 25 August 2009 10:30 Go to previous message
Tee Bee is currently offline Tee BeeFriend
Messages: 18
Registered: July 2009
Junior Member
Ah, sorry my mistake. And thank you! :)
Re: Non-containment references EMF reflective model editor [message #621330 is a reply to message #481985] Tue, 25 August 2009 07:53 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33217
Registered: July 2009
Senior Member
Tee,

It's best to use the EMF newsgroup for questions about EMF's core
frameworks. I've added it to the "to" list of the reply.

More comments below.



Tee Bee wrote:
> Hi!
>
> I wonder whether someone could help me with some insight regarding
> instantiation of a meta model class that is referred merely with the
> use of a non-containment reference in the emf reflective model editor?
There was a very similar question to this on the EMF newsgroup just
yesterday. You might want to have a look at the thread "containment or
reference -> consequences in generated Editor commands"
>
> Consider a meta model (pure .ecore file) consisting of three classes:
> House, Room and Type. House is composed of Rooms (containment
> reference), and has a type of Type (non-containment reference).
> Moreover, making a dynamic instance of the House class and thus
> instances of Room using the reflective model editor work great!
> However, I have not found any way of creating an instance of the Type
> class and associate it with my House class, due to the Type class not
> being contained by House.
>
> Any ideas how I can create my Type instance in the model?
You'd need to create an instance of Type in a separate resource where it
would be the root object of the resource. Then in the resource for the
House, you could use Load Resource... to load the resource that defines
a/the type. Once loaded, you'd be able to refer to that Type in the
properties view for the House.
>
> All help is highly appreciated!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Non-containment references EMF reflective model editor [message #621332 is a reply to message #482031] Tue, 25 August 2009 10:30 Go to previous message
Tee Bee is currently offline Tee BeeFriend
Messages: 18
Registered: July 2009
Junior Member
Ah, sorry my mistake. And thank you! :)
Previous Topic:Non-containment references EMF reflective model editor
Next Topic:Re: [XTEXT] generators and includes
Goto Forum:
  


Current Time: Tue Sep 24 13:22:50 GMT 2024

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

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

Back to the top