[Xpand / Xtend] typeSelect() on stereotype does not work [message #641832] |
Sun, 28 November 2010 10:49  |
Eclipse User |
|
|
|
Hi,
after successfully accessing my Profie in Xpand/Xtend I was wondering how to enable my stereotypes as regular types, so that typeSelect can recognize them?
I have a sample model where one class has the stereotype of "Form". Now I want in xTend do be able to do this e.eContents.typeSelect(Form)
But currently this does not work. He only finds "Class" as a type, which has "Form" as an applied stereotype.
As far as I can see, the Hibernate Cartridge also has Entity as a stereotype but manages to work with Entity as a type.
I tried to test with the Persistence.profile.uml and the example-model.uml whether I could select all Entities with
e.eAllContents.typeSelect(Entity)
but it did not work either.
So I am thinking there is some option I have to enable to make it work in my project.
Does someone know what I have to do?
Currently I have the following and I get an error, that main for uml::Class is not defined. It is because I am getting back Elements of type "Class" instead of "Form".
List[Form] forms(Model this) :
this.eContents.typeSelect(Class).select(e|e.getAppliedStereotype("Forms::Form") != null);
«DEFINE main FOR Model»
«EXPAND main FOREACH forms()»
«ENDDEFINE»
«DEFINE main FOR Form»
«FILE name+".java"»
public class «name» {
}
«ENDFILE»
«ENDDEFINE»
Muba
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.15643 seconds