ObeoNetwork / M2Doc

The M2Doc technology enables the generation of Office Open XML documents from models.
http://obeonetwork.github.io/M2Doc/
Eclipse Public License 2.0
38 stars 22 forks source link

The new template creation wizard fail if the EClass of the selected model element has no EAttributes #505

Closed ylussaud closed 10 months ago

ylussaud commented 10 months ago

The new template creation wizard fail if the EClass of the selected model element has no EAttributes:

org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
  at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:346)
  at org.obeonetwork.m2doc.util.SampleTemplateGenerator.generate(SampleTemplateGenerator.java:71)
  at org.obeonetwork.m2doc.util.M2DocUtils.createSampleTemplate(M2DocUtils.java:1119)
  at org.obeonetwork.m2doc.ide.ui.wizard.M2DocNewTemplateWizard$FinishJob.run(M2DocNewTemplateWizard.java:104)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)