Skip to main content


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 08:03 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
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 16:21 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
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: Fri Apr 19 07:09:06 GMT 2024

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

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

Back to the top