gmf.label for EAttributes - use of pattern [message #1128456] |
Mon, 07 October 2013 14:11  |
Eclipse User |
|
|
|
Hello,
Please, I need help for the following issue. I want to model the metaclass "CEOLidership" which has a list of attributes (pairs of key/value), such as:
- Tolerance Of Ambiguity : value{yes/no/no evidence}
- Self confidence : value{yes/no/no evidence}
- ....
I used gmf.label and label.pattern.
Althoug label.pattern works for gmf.node (see labels v1 and v2), it seems that label.pattern does not work for gmf.label
Any suggestion to make a fixed list of attributes in the form "key : value"
Please find below the code for any suggetion.
Thanks in advance.
---------------------------------------------------------
@namespace(uri="InnoModelingTool", prefix="InnoModelingTool")
package InnoModelingTool;
@gmf.diagram
class InnoModel {
val Employee[*] employees;
val Determinant[*] determinants;
}
@gmf.node(figure="rectangel",
label.icon="false", label="name", label.placement="external")
class Employee {
attr String name;
@gmf.link(width="2", color="0,0,255", target.decoration="arrow", style="dash")
ref CEOLidership exercises;
}
abstract class Determinant {
attr String name;
}
@gmf.node(label="v1,v2", figure="rectangle", label.pattern="aa:{0}:{1}",
tool.small.bundle="InnoModelingTool", tool.small.path="icons/CEO.gif")
class CEOLidership extends Determinant{
attr String v1;
attr String v2;
@gmf.label(label="toleranceofamiguityvalue", label.icon="false", label.pattern="Tolerance Of Ambiguity : {0}")
attr CEOFactorValue toleranceofamiguityvalue;
@gmf.label(label="selfconfidencevalue", label.icon="false", label.pattern="Self Confidence : {0}")
attr CEOFactorValue selfconfidencevalue;
}
//ENUM
enum CEOFactorValue{
no = 0;
yes = 1;
noEvidence = 2;
}
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24966 seconds