Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Error in links between components of the same ESuper type
Error in links between components of the same ESuper type [message #640221] Fri, 19 November 2010 16:10 Go to next message
lalakis  is currently offline lalakis Friend
Messages: 48
Registered: October 2009
Member
I want to implement a metamodel like this:
4 classes:
-A,B,C,D.
Each will have some properties.
A:a,c,b
B:d.f
C:r,t
D:k,l
I want for every these Eclasses links between them
-A->B or B->A or C->D or D->A etc,and i want to be aware of the source and target of each Eclass.

So,i thought that it would be usefull to declare a Supertype called GeneralClass with the common attributes of all the Eclasses if any and 1 reference attribute which is called Connection and is of type GeneralClass.
I have also set the Connection containment as true and at the gmfmap file i have set the target feature= source feature = contenmaint feature = GeneralClass.connection:GeneralClass and the Element is of GeneralClass type.

So declaring theESuper type of A,B,C,D as GeneralClass i thought that i could achieve what i wanted.But this doesn't work at my gmf editor and i am getting a stackoverflow whenever i try to make a connection between my objects.

Any ideas?Sorry if this fits more in GMF forum.But my question is if i did anything wrong with my metamodel
(I do not want to have 4 type of connections,only 1 which will hold the source and target)

Re: Error in links between components of the same ESuper type [message #640225 is a reply to message #640221] Fri, 19 November 2010 16:29 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,
I suggest you test your meta-model without GMF to isolate the fault. Do
you have two references in GeneralClaa, which are opposite of each
other? Also I do not quite understand, why you use containment, but
maybe that come from your conceret domain...
Cheers
Jonas

On 19.11.10 17:10, lalakis wrote:
> I want to implement a metamodel like this:
> 4 classes:
> -A,B,C,D.
> Each will have some properties.
> A:a,c,b
> B:d.f
> C:r,t
> D:k,l
> I want for every these Eclasses links between them -A->B or B->A or C->D
> or D->A etc,and i want to be aware of the source and target of each Eclass.
>
> So,i thought that it would be usefull to declare a Supertype called
> GeneralClass with the common attributes of all the Eclasses if any and 1
> reference attribute which is called Connection and is of type GeneralClass.
> I have also set the Connection containment as true and at the gmfmap
> file i have set the target feature= source feature = contenmaint feature
> = GeneralClass.connection:GeneralClass and the Element is of
> GeneralClass type.
>
> So declaring theESuper type of A,B,C,D as GeneralClass i thought that i
> could achieve what i wanted.But this doesn't work at my gmf editor and i
> am getting a stackoverflow whenever i try to make a connection between
> my objects.
>
> Any ideas?Sorry if this fits more in GMF forum.But my question is if i
> did anything wrong with my metamodel
> (I do not want to have 4 type of connections,only 1 which will hold the
> source and target)
>
>
Re: Error in links between components of the same ESuper type [message #640486 is a reply to message #640225] Mon, 22 November 2010 10:09 Go to previous messageGo to next message
lalakis  is currently offline lalakis Friend
Messages: 48
Registered: October 2009
Member
hi Jonas and thanks for your response.
In fact no,i do not have 2 references which are opposite of each other.So to keep track of both source and target i have to implement this.

COLOR=blue]Also I do not quite understand, why you use containment, but
maybe that come from your conceret domain
.[/COLOR]

When i am trying to make a map in between the genmodel and my graph file indicated at the gmfmap file to create my gmf editor i am getting an error when i am trying to specify the target feature at my link ,which tells that this is not allowed to non containments components. Maybe this is because os the above lack of having 2 references
Re: Error in links between components of the same ESuper type [message #640517 is a reply to message #640486] Mon, 22 November 2010 11:11 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,
now it is in fact more getting a GMF question. I would repost this to
GMF newsgroup.
For an EMF viewpoint, I would do a model test first, that is
programatically create instances of your model and link them. But I am
pretty sure, it is about your GMF model.
I could image that uni-directional references are problematic in GMF,
but I am not sure. Why don't you just try this out? Although I am not a
GMF expert I do not think you have to use containment for normal links
in diagrams. I assume you are using containment (one shape s contained
in another) on the diagram, too.
Cheers
Jonas


On 22.11.10 11:09, lalakis wrote:
> hi Jonas and thanks for your response.
> In fact no,i do not have 2 references which are opposite of each
> other.So to keep track of both source and target i have to implement this.
>
> COLOR=blue]Also I do not quite understand, why you use containment, but
> maybe that come from your conceret domain.[/COLOR]
>
> When i am trying to make a map in between the genmodel and my graph file
> indicated at the gmfmap file to create my gmf editor i am getting an
> error when i am trying to specify the target feature at my link ,which
> tells that this is not allowed to non containments components. Maybe
> this is because os the above lack of having 2 references
Re: Error in links between components of the same ESuper type [message #640567 is a reply to message #640517] Mon, 22 November 2010 14:06 Go to previous message
lalakis  is currently offline lalakis Friend
Messages: 48
Registered: October 2009
Member
I made a test on my new emf model,after changing the ecore file and adding two references of the same type at my super type eClass and make them opposite each other.Now i am able to define at an instance of my metamodel the in reference and the out reference.So it is working fine.I am going to chack the integration with the gmf part.
Previous Topic:[Ecore Tools] Observe .ecore changes made via ecorediag
Next Topic:EMF Form Editor for a WS-Policy ecore model
Goto Forum:
  


Current Time: Thu Apr 25 09:40:41 GMT 2024

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

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

Back to the top