Skip to main content


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 MihirFriend
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: Fri Apr 26 14:09:01 GMT 2024

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

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

Back to the top