Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Polarsys » M2Doc » M2Doc and PVMT extension
M2Doc and PVMT extension [message #1823051] Wed, 18 March 2020 20:52 Go to next message
Fábio Guarita is currently offline Fábio GuaritaFriend
Messages: 64
Registered: December 2019
Member
Hi, I am trying to get M2Doc to generate documentation of custom PVMT add-on model properties.

I applied the following properties to ComponentExchanges as seen below:

index.php/fa/37610/0/

I want to be able to display the contents of the string "description" on the generated doc.

I was able to access its value through the follwing aql query in Sirius interpreter:

aql:self.eAllContents(fa::ComponentExchange).eContents().eContents()->select(x | x.name = 'Description').value

but, whenever I try to access the feature "value" in the template like this:
index.php/fa/37612/0/

it returns the following errors:
index.php/fa/37611/0/
Re: M2Doc and PVMT extension [message #1823052 is a reply to message #1823051] Wed, 18 March 2020 20:54 Go to previous messageGo to next message
Fábio Guarita is currently offline Fábio GuaritaFriend
Messages: 64
Registered: December 2019
Member
Just adding to this, I wanted to be able to reach the values of enumeration too but I've come to this point where it seems I can't go on without getting the value from the applied properties.
Re: M2Doc and PVMT extension [message #1823080 is a reply to message #1823052] Thu, 19 March 2020 08:35 Go to previous messageGo to next message
Yvan Lussaud is currently offline Yvan LussaudFriend
Messages: 63
Registered: July 2009
Member
You are collecting all elements at de depth of 2 and some of them don't have a feature name (see error message for the list). You probably need to do something more specific.

You will need to select the extension of the corresponding type for PVMT:

myComEx.ownedExtensions->filter(PVMTPackage::PVMTType).description

you can use the .eClass() service in the interpreter to find the appropriate type. Select the extension and use "aql:self.eClass()". If you want to know the list of features you can use "aql:self.eClass().eAllStructuralFeatures".

You should also add PVMT metamodels to your template properties.
Re: M2Doc and PVMT extension [message #1823122 is a reply to message #1823080] Thu, 19 March 2020 17:34 Go to previous message
Fábio Guarita is currently offline Fábio GuaritaFriend
Messages: 64
Registered: December 2019
Member
Hi Yvan,

I found a different solution (actually I believe it falls in your solution but is more specific). It was described in a topic on the old Forum (link below).

Too bad I wasn't able to find it there before. I searched it but I only found it today by reading each post until finding the answer. I'll leave the link so others can use this solution as well.

https://polarsys.org/forums/index.php/t/905/

[Updated on: Thu, 19 March 2020 17:48]

Report message to a moderator

Previous Topic:AQL query works on Sirius interpreter, returns error on M2DOC
Next Topic:M2Doc technical error : Index 0, Size 0
Goto Forum:
  


Current Time: Thu Apr 18 22:17:13 GMT 2024

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

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

Back to the top