Hello Everyone,
I have a problem when using xpand with a model that has a stereotype on some classes (the stereotype is defined and applied on classes).
The problem is that when a class has the stereotype Xpand does only recognize that its actually a uml::class but only the stereotype. This seems to be fine but in our situation the stereotype is only a marker that has no attributes/tags. So basically every class that has the stereotyp cannot be used anymore.
here is a small example of what i try to do:
«FOREACH ownedElement AS c ITERATOR iter SEPARATOR ','»
«IF uml::AssociationClass.isInstance(c)»
«EXPAND AssociationClassRoot(packageName+"666"+this.name) FOR c»
«ELSEIF uml::Class.isInstance(c)»
«EXPAND ClassRoot(packageName+"111"+this.name) FOR c»
«ELSEIF uml::Package.isInstance(c)»
«EXPAND ClassRoot(packageName+"1"+this.name) FOR c»
«ENDIF»
«ENDFOREACH»
The problem here is that every class with the stereotype cannot be processed by
«EXPAND ClassRoot(packageName+"111"+this.name) FOR c»
whereby ClassRoot is defined for packages classes etc such as
«DEFINE ClassRoot(String packageName) FOR uml::Class»
if I add a rule like
«ELSEIF MoVEExecutableProfile::InternalElement.isInstance(c)»
«EXPAND ClassRoot(this.name) FOR c»
with a correspondig DEFINE statement, I do not get any exceptions but of course since InternalElement is only a marker I cannot do anything with the element..
for example this.name does not work or just throws exceptions..
I hope I could express my problem?
I tried several version to solve the type problem for example with typecasting like
«EXPAND ClassRoot(packageName+"111"+this.name) FOR (uml:class) c
.
None of the "solutions" helped..
Do you have an idea of what I could do?
Thanks for any help!