[EuGENia] Node label from attribute of contained class [message #571089] |
Sun, 26 July 2009 10:59 |
Mihir Messages: 83 Registered: July 2009 |
Member |
|
|
Hello,
Below is the snippet from the .emf file. The output of the below code
resembles to the UML Object diagram where ObjectTemplateExp is Object
and PropertyTemplateExp is the attribute in the object.
I want to fetch the value of attr "name" from VariableExp class and show
it as a label for ObjectTemplateExp node. Also, want to fetch the name
of the referred class so that the label pattern looks like "variable :
(name of referredClass)"
Same for the label of PropertyTemplateExp "(name of referredProperty) =
value"
Any help/pointers to help will be highly appreciated.
code:
@gmf.node(label="variable.name")
class ObjectTemplateExp extends ExtendedOclExp {
val VariableExp variable;
@gmf.compartment(layout="list", collapsible="false")
val PropertyTemplateExp[*] propertyTemplates;
ref EClass referredClass;
}
@gmf.node(label="name", label.icon="false", figure="rectangle")
class PropertyTemplateExp {
val ExtendedExp value;
@gmf.link(target.decoration="arrow")
ref ecore.EStructuralFeature referredProperty;
}
class VariableExp {
!unique !ordered attr String name;
}
Thanks,
Mihir
|
|
|
Powered by
FUDForum. Page generated in 0.02899 seconds