Skip to main content


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 18:49 Go to next message
Aran A is currently offline Aran AFriend
Messages: 30
Registered: January 2011
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 20:22 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
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
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] IllegalStateException during attempts to reconnect
Next Topic:[TENEO] Lazy Loading with UML
Goto Forum:
  


Current Time: Fri Mar 29 12:12:24 GMT 2024

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

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

Back to the top