【发布时间】:2012-09-12 14:17:27
【问题描述】:
我有一个 Eclass Vehicle,它有一个枚举属性 BreakType breakType。
BreakType 在相同的 Ecore 模型中定义为:
BreakType{
DRUM(0), DISC(1), BLADE(2)
}
我想将属性breakType 默认设置为空。为此,我为breakType 属性设置了以下属性->
DefaultLiteralValue: // it's blank
Unsettable: True
Properties of BreakType enum
Default Value : DRUM=0 // this is shown in editor UI even If i remove it from xml.
生成 gen-model 和代码后我得到的是
BreakType breakType = DRUM // attribute set with default value
如何将其设置为默认值?
【问题讨论】:
标签: eclipse-emf eclipse-emf-ecore emf