Impossible to delete blank line in generated word with template

94 Views Asked by At

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. Example of my code :

{ m:if ports.name.contains('LOC')}

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

Thank you.

Regards,

Marc

1

There are 1 best solutions below

0
Yvan Lussaud On

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.