Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Generation in Xpand(An uml element has a wrong type)
Generation in Xpand [message #663457] Tue, 05 April 2011 04:03 Go to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 2
Registered: April 2011
Junior Member
Hello,

i'm writting a code generator in xpand. I use UML2 and Topcased.

My Metamodel:

http://image-upload.de/image/ZTtgOm/b0b3b66bb6.png

Model:
http://image-upload.de/image/mF8kNI/955989072d.png

Xpand Code:

«IF MyIns.isInstance(this)»
«((MyIns)this).Property1»
«((MyIns)this).Property2»
«ENDIF»

After the generation the Property1 has the correct type but Property2 must be OperationImpl but it is a type of DynamicEObjectImpl.

Output:
org.eclipse.uml2.uml.internal.impl.ClassImpl@2ad191 (name: MyClass1, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false)
org.eclipse.emf.ecore.impl.DynamicEObjectImpl@f229cd (eClass: org.eclipse.emf.ecore.impl.EClassImpl@10772d2 (name: MyOperation) (instanceClassName: null) (abstract: false, interface: false))

Why is Property2 not a type of OperationImpl. Is this a bug?
Is there a solution?

Thanks a lot in advance!

Re: Generation in Xpand [message #663565 is a reply to message #663457] Tue, 05 April 2011 12:21 Go to previous message
Rafael Chaves is currently offline Rafael Chaves
Messages: 161
Registered: July 2009
Senior Member
Can you attach here the XMI for the model, and ideally the profile as well?
Previous Topic:The type org.eclipse.emf.ecore.EModelElement cannot be resolved.
Next Topic:Diagram Question
Goto Forum:
  


Current Time: Tue Jul 22 07:32:57 EDT 2014

Powered by FUDForum. Page generated in 0.01475 seconds