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 |
lalakis 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 |
Jonas Helming 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 #640517 is a reply to message #640486] |
Mon, 22 November 2010 11:11 |
Jonas Helming 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
|
|
| |
Goto Forum:
Current Time: Thu Apr 25 09:40:41 GMT 2024
Powered by FUDForum. Page generated in 0.02999 seconds
|