2013-08-19 36 views
1

我寫這寫LDIF文件模塊內attributs,acceleo得到定型從一個模塊

我有一個叫做刻板印象‘由具有許多attributs(用戶名,密碼metaclasse用戶自定義’,角色,..)

的問題是,我不能從模塊中訪問這些attributs ..

我應該怎麼辦!

回答

1

使用的getValue操作。在下面的例子中,elem具有屬性類型爲'value'的配置文件'clbProfile'的原型'EnumLiteralCodeValue'

[elem.getValue(elem.getAppliedStereotype('clbProfile::EnumLiteralCodeValue'),'value')/] 
+0

它的作品,謝謝;) – TheEnglishMe

0

在你acceleo腳本,你可以使用getAppliedStereotypes俗套:

例(UML類型在我的腳本):

[template public myrule (t : Type)] 
[if t.getApplicableStereotypes() <> null/] 
// blabla 
[/if] 
相關問題