Abstract Class: How to handle links defined at the abstract class level [message #716706] |
Thu, 18 August 2011 03:31  |
Eclipse User |
|
|
|
Hello,
I have an ecore model with an Abstract Class. I have defined links at the level of the abstract class.
Case in Point: Abstract class is "Person" and has concrete classes "Male" and "Female". I have defined EReference links at the abstract class level such as Person "friend of" Person. What essentially is happening is that when I try to derive grapical difinitions and also derive the tool pallete elements, the EReference link "friend-of" is replicated for each concrete class in this case it is replicated for Male and Female: If I had five concrete classes this link will be replicated 5 times. I will have 5 icons on the tooling palette. What I need is to have ONE link as defined at the abstract class level and this link is not replicated(in child classes). The concrete or child classes, I would assume should be able to use a link at the parent(abstract) class level. This does not seem to happen. I have tried to change the abstract(parent) class to a concrete class but this also adds more confusion as longs as there is the parent/child inheritance.
Could someone please advise on what to do in such as situation? What are the capabilities of GMF as far as inheritance in concerned. Thanks in advance.
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.30469 seconds