Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » a reference to a previous element (tree view of the model)
a reference to a previous element (tree view of the model) [message #990502] Wed, 12 December 2012 13:49 Go to next message
Aran A is currently offline Aran A
Messages: 22
Registered: January 2011
Junior Member
Hi!,

Working with the "Sample Reflective Ecore Model Editor" I've found a behaviour that seems quite strange to me. I would like to know what the reason is.

In my metamodel I have two classes A and B, the former has a no-containment association (cardinality: 1) to B (called 'creates').

Using the "create dynamic instance" option, I have created a new model conformed to the metamodel. Everything is OK. When I open that model with the "Sample Reflective Ecore Model Editor" I see that when an A element refers to one B element that is behind itself in the tree, its 'creates' attribute is fulfilled with the right value (the identity of the corresponding B element). However, when the A element refers to one B element that is before itself in the tree, its 'creates' attribute is 'empty'. If I open the model with the "Text editor", in both cases the 'creates' attribute has the right value, so in the second case, the reference attribute seems to be 'empty', but it has a value really.

Could anybody explain me the reason for this behaviour? or maybe, do I have to change any configuration somewhere?

Thanks in advance, best regards

Aran
Re: a reference to a previous element (tree view of the model) [message #990700 is a reply to message #990502] Wed, 12 December 2012 15:22 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25946
Registered: July 2009
Senior Member
Aran,

Comments below.

On 12/12/2012 7:49 PM, Aran A wrote:
> Hi!,
>
> Working with the "Sample Reflective Ecore Model Editor" I've found a
> behaviour that seems quite strange to me. I would like to know what
> the reason is.
>
> In my metamodel I have two classes A and B, the former has a
> no-containment association (cardinality: 1) to B (called 'creates').
>
> Using the "create dynamic instance" option, I have created a new model
> conformed to the metamodel. Everything is OK. When I open that model
> with the "Sample Reflective Ecore Model Editor" I see that when an A
> element refers to one B element that is behind itself in the tree, its
> 'creates' attribute is fulfilled
So you mean the reference.
> with the right value (the identity of the corresponding B element).
> However, when the A element refers to one B element that is before
> itself in the tree, its 'creates' attribute is 'empty'.
What do you mean by 'empty'? You're seeing this in the Properties view?
> If I open the model with the "Text editor", in both cases the
> 'creates' attribute has the right value, so in the second case, the
> reference attribute seems to be 'empty', but it has a value really.
>
> Could anybody explain me the reason for this behaviour? or maybe, do I
> have to change any configuration somewhere?
I don't understand what you're trying to explain. Perhaps a screen
capture would help...
>
> Thanks in advance, best regards
>
> Aran
>
Previous Topic:[CDO] IllegalStateException during attempts to reconnect
Next Topic:[TENEO] Lazy Loading with UML
Goto Forum:
  


Current Time: Wed Jul 30 13:12:08 EDT 2014

Powered by FUDForum. Page generated in 0.02329 seconds