Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Stereotype problem(Problem when applying a Stereotype )
[Xpand] Stereotype problem [message #1095601] Tue, 27 August 2013 09:19 Go to next message
philipp kalb is currently offline philipp kalbFriend
Messages: 1
Registered: August 2013
Junior Member
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!


Re: [Xpand] Stereotype problem [message #1095859 is a reply to message #1095601] Tue, 27 August 2013 16:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

can you share a little example project?



Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] Stereotype problem [message #1095883 is a reply to message #1095859] Tue, 27 August 2013 17:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
P.S: depending on how you definded the property you may find the following in the log
ERROR StereotypeType - Couldn't find type for Whatever


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] Stereotype problem [message #1095897 is a reply to message #1095883] Tue, 27 August 2013 17:32 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
so depeding on your version you may be affected by https://bugs.eclipse.org/bugs/show_bug.cgi?id=333605

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[acceleo] Run Acceleo M2T JUnit Test from tycho
Next Topic:[Acceleo] Target folder outside workspace in absolute path
Goto Forum:
  


Current Time: Fri Apr 26 08:30:23 GMT 2024

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

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

Back to the top