Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Class properties from Element
Class properties from Element [message #1808846] Tue, 02 July 2019 23:44 Go to next message
Eclipse UserFriend
In the following code i am not table to get the properties of Classes.

[template public generateElement(m: Model)]
[comment @main/]
[file ('EFModel/sdf.cs', false, 'UTF-8')]

[for (p:uml::Element | self.allOwnedElements())]
[if (p.oclIsTypeOf(uml::Class))]
[p/]
[/if]
[/for]

[/file]
[/template]

Can any one please help me

Thanks

[Updated on: Wed, 03 July 2019 00:32] by Moderator

Re: Class properties from Element [message #1808848 is a reply to message #1808846] Wed, 03 July 2019 00:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi

You really should try debugging.

See what owned elements you can see. My guess is that your Model contains Packages (which contain Classes). Your Model does not contain Classes.

Regards

Ed Willink
Re: Class properties from Element [message #1808851 is a reply to message #1808848] Wed, 03 July 2019 02:37 Go to previous message
Eclipse UserFriend
Model also contain classes. When i iterate in this loop this can retrieve classes but this actually retrieve metadata of class. now i am not able to get the name of class.

In my case i have not added any package in UML Class diagram

[Updated on: Wed, 03 July 2019 03:17] by Moderator

Previous Topic:[Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0.2
Next Topic:Loop in the query of acceleo
Goto Forum:
  


Current Time: Fri Apr 18 03:51:13 EDT 2025

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

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

Back to the top