Getting stereotype's property values. [message #625991] |
Thu, 07 February 2008 13:36 |
Eclipse User |
|
|
|
Originally posted by: antti.evesti.vtt.fi
Hi
I have connected a stereotype for a component element. Now I try to get
properties and their values from that stereotype, how I should do this?
Following code gives properties' names correctly, but I cannot find a way to
getting values for these properties. I suppose this is quite trivial task.
However, I cannot find a suitable method for this task.
Thanks,
Antti
<------------------ CODE ----------------------------------->
private void getStereotypes(Component component) {
System.out.println("** Getting stereotypes for " +
component.getLabel());
EList<Stereotype> e = component.getAppliedStereotypes();
for(Stereotype s : e) {
System.out.println(s.getLabel());
EList<Property> el = s.getAttributes();
for(Property p : el) {
System.out.println(p.getLabel());
}
}
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.02370 seconds