[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

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