Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EuGENia] Node label from attribute of contained class
[EuGENia] Node label from attribute of contained class [message #571089] Sun, 26 July 2009 10:59
Mihir is currently offline 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
Previous Topic:[EuGENia] significance of Synchronize GMF Gen model
Next Topic:[EuGENia] Two or more compartments on canvas
Goto Forum:
  


Current Time: Sun Oct 26 01:56:11 GMT 2014

Powered by FUDForum. Page generated in 0.01511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software