Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Polarsys » M2Doc » Impossible to delete blank line in generated word with template
Impossible to delete blank line in generated word with template [message #1820801] Wed, 29 January 2020 10:19 Go to next message
Emmanuel SEMO is currently offline Emmanuel SEMOFriend
Messages: 7
Registered: October 2019
Junior Member
Hello everybody,

I'm currently using m2doc for my Capella project and when I launch the generatio of the docuement with the template that I have created some lines in my tables are empty and they are not deleted.
Example :
test | test | test
| |
file | file | file

I'm currently using Acceleo in my template to retrieve the information in my Capella diagrams. But I don't know how to delete this empty lines in the table which are useless for me. I tried the element "<drop/>" but it is not working.
Example of my code :
{ m:if ports.name.contains('LOC')}
and I tried this :
{ m:if ports.name.contains('LOC')} <drop /> which is not working too.

So I need your help to delete this empty lines in my table.

Thank you.

Regards,

Emmanuel
Re: Impossible to delete blank line in generated word with template [message #1820806 is a reply to message #1820801] Wed, 29 January 2020 11:17 Go to previous messageGo to next message
Samuel Rochet is currently offline Samuel RochetFriend
Messages: 21
Registered: November 2014
Junior Member
Hi Emmanuel,

Aren't you confusing with gendoc?
Please refer to the M2doc website for correct syntax.

Samuel
Re: Impossible to delete blank line in generated word with template [message #1820810 is a reply to message #1820806] Wed, 29 January 2020 12:52 Go to previous messageGo to next message
Emmanuel SEMO is currently offline Emmanuel SEMOFriend
Messages: 7
Registered: October 2019
Junior Member
Hi Samuel,

Firs all thank you for you answer no I'm not I'm following this documentation :
https://www.m2doc.org/ref-doc/2.0.1/index.html

but there is no information to delete empty lines in table when the doc is generated. This is why I' m asking the question here to know how to delete this lines because there is nothing in the m2doc website.

Regards,

Emmanuel
Re: Impossible to delete blank line in generated word with template [message #1820824 is a reply to message #1820810] Wed, 29 January 2020 17:14 Go to previous messageGo to next message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
Hi Emmanuel,
Can you put a more complete example of your code that generates
test | test | test
| |
file | file | file

Stephane


Stephane LACRAMPE
Obeo Canada
Re: Impossible to delete blank line in generated word with template [message #1820967 is a reply to message #1820824] Mon, 03 February 2020 16:04 Go to previous message
Yvan Lussaud is currently offline Yvan LussaudFriend
Messages: 63
Registered: July 2009
Member
If you insert your table using asTable*() from Sirius services, the table is an instance of the Java type MTable.
You can write a Java service that take a MTable as parameter and check for MRow without any MCell in it. If the MRaw is empty remove it from the table and return the table.

[Updated on: Mon, 03 February 2020 16:06]

Report message to a moderator

Previous Topic:Class Diagrams
Next Topic:AQL: How to find the owner of a port?
Goto Forum:
  


Current Time: Fri Mar 29 13:35:28 GMT 2024

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

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

Back to the top