Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Class properties from Element
Class properties from Element [message #1808846] Wed, 03 July 2019 03:44 Go to next message
Mohammad Inayatullah is currently offline Mohammad InayatullahFriend
Messages: 21
Registered: May 2019
Junior Member
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 04:32]

Report message to a moderator

Re: Class properties from Element [message #1808848 is a reply to message #1808846] Wed, 03 July 2019 04:57 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
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 06:37 Go to previous message
Mohammad Inayatullah is currently offline Mohammad InayatullahFriend
Messages: 21
Registered: May 2019
Junior Member
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 07:17]

Report message to a 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: Tue Mar 19 11:43:53 GMT 2024

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

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

Back to the top