[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.emf] Default Value of an inherited EAttribute or EReference
|
- From: johntimm@xxxxxxxxxx (John T.E. Timm)
- Date: Wed, 6 May 2009 03:32:53 +0000 (UTC)
- Newsgroups: eclipse.tools.emf
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I have two classes A and B. B is a subclass of A. B inherits an attribute
from A and I want to default the value of this attribute when B is
constructed.
A : EClass
attr : EAttribute
B -> A : EClass
attr := 'someDefaultValue' : EAttribute
What is the best way to set the default value of an inherited EAttribute
or EReference? My guess is that I need to extend code generation to pick
up an annotation attached to an EClass and generate some initialization
code in the constructor. Does such an annotation already exist? Is there a
more automated way of accomplishing this?
Thanks,
JT