diff options
author | Quentin Le Menez | 2019-07-11 15:19:09 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2019-07-11 15:19:09 +0000 |
commit | 1f35e9a4b154594843ab61b68416641070481128 (patch) | |
tree | e9e961812c7793b36dd8b92f300c510f942c5efc | |
parent | 7b36fd1aa12d4d07ec5ce4eac92ac3eea1ed0e27 (diff) | |
parent | 58b63d6eea4cc3870c5273320370dd38fdbef69d (diff) | |
download | org.eclipse.papyrus-model2doc-1f35e9a4b154594843ab61b68416641070481128.tar.gz org.eclipse.papyrus-model2doc-1f35e9a4b154594843ab61b68416641070481128.tar.xz org.eclipse.papyrus-model2doc-1f35e9a4b154594843ab61b68416641070481128.zip |
2 files changed, 15 insertions, 6 deletions
diff --git a/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/OSGI-INF/l10n/bundle.properties b/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/OSGI-INF/l10n/bundle.properties index 8a6e5f84..a8cccd44 100755 --- a/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/OSGI-INF/l10n/bundle.properties +++ b/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/OSGI-INF/l10n/bundle.properties @@ -1,3 +1,3 @@ #Properties file for org.eclipse.papyrus.model2doc.integration.nattable.template2structure Bundle-Vendor = Eclipse Modeling Project -Bundle-Name = Papyrus-Model2Doc - Nattable Template2structure Integration (Incubation)
\ No newline at end of file +Bundle-Name = Papyrus-Model2Doc - NatTable Template2structure Integration (Incubation)
\ No newline at end of file diff --git a/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java b/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java index 27240276..f23ccc82 100755 --- a/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java +++ b/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java @@ -10,7 +10,7 @@ * * Contributors: * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation - * + * Vincent Lorenzo (CEA LIST) - bug 549183 *****************************************************************************/ package org.eclipse.papyrus.model2doc.integration.nattable.template2structure.internal.mapping; @@ -304,10 +304,19 @@ public class PapyrusTableViewMapper extends AbstractTemplateToStructureMapper<Pa // 8.2 add the body cells for the row final CellIterator cellIterator = rowIterator.next(); - while (cellIterator.hasNext()) { - final TextCell cell = DocumentStructureFactory.eINSTANCE.createExtendedTextCell(); - cell.setText(cellIterator.next()); - row.getCells().add(cell); + if (cellIterator != null) { + if (!cellIterator.hasNext()) { + // in case of tree table with only one column, the empty cells are not in the cellIterator... + // see bug 549183 + final TextCell cell = DocumentStructureFactory.eINSTANCE.createExtendedTextCell(); + row.getCells().add(cell); + } else { + while (cellIterator.hasNext()) { + final TextCell cell = DocumentStructureFactory.eINSTANCE.createExtendedTextCell(); + cell.setText(cellIterator.next()); + row.getCells().add(cell); + } + } } } return basicTable; |