[Sirius] NPE when the user creates a new DocumentStructureTemplate from the ModelExplorer
java.lang.NullPointerException: Cannot invoke "org.eclipse.emf.ecore.resource.ResourceSet.getURIConverter()" because the return value of "org.eclipse.papyrus.emf.resources.AbstractEMFResourceWithUUID.getResourceSet()" is null at org.eclipse.papyrus.emf.resources.AbstractEMFResourceWithUUID.isReadOnly(AbstractEMFResourceWithUUID.java:78) at org.eclipse.papyrus.emf.resources.AbstractEMFResourceWithUUID.assignIDsWhileLoading(AbstractEMFResourceWithUUID.java:68) at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.attachedHelper(XMLResourceImpl.java:676) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.attached(ResourceImpl.java:888) at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.inverseAdd(ResourceImpl.java:411) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:286) at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:304) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.ui.modelresource.DocumentTemplateModel.addDocument(DocumentTemplateModel.java:117) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.representation.architecture.commands.AbstractCreatePapyrusEditorViewCommand.attachToResource(AbstractCreatePapyrusEditorViewCommand.java:143) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.representation.architecture.commands.CreateDocumentTemplateEditorViewCommand.doExecute(CreateDocumentTemplateEditorViewCommand.java:92) at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:130) at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:114) at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:145) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:488) at org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory.doExecute(CheckedOperationHistory.java:208) at org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory.execute(CheckedOperationHistory.java:197) at org.eclipse.papyrus.infra.emf.gmf.command.NotifyingWorkspaceCommandStack.doExecute(NotifyingWorkspaceCommandStack.java:266) at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:160) at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:214) at org.eclipse.papyrus.infra.emf.gmf.command.NestingNotifyingWorkspaceCommandStack.execute(NestingNotifyingWorkspaceCommandStack.java:132) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.representation.architecture.AbstractCreateDocumentTemplateEditorCommand.execute(AbstractCreateDocumentTemplateEditorCommand.java:104) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.representation.architecture.CreatePapyrusDocumentTemplateEditorCommand.execute(CreatePapyrusDocumentTemplateEditorCommand.java:102) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.ui.internal.viewpoint.PapyrusDocumentTemplateViewPrototype.instantiateOn(PapyrusDocumentTemplateViewPrototype.java:199) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.ui.internal.viewpoint.PapyrusDocumentTemplateViewPrototype.instantiateOn(PapyrusDocumentTemplateViewPrototype.java:66) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.ui.internal.viewpoint.PapyrusDocumentTemplateViewPrototype.instantiateOn(PapyrusDocumentTemplateViewPrototype.java:89) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.ui.internal.viewpoint.PapyrusDocumentTemplateViewPrototype.instantiateOn(PapyrusDocumentTemplateViewPrototype.java:77) at org.eclipse.papyrus.model2doc.integration.emf.documentstructuretemplate.ui.internal.menus.DocumentTemplateDynamicContribution$1.run(DocumentTemplateDynamicContribution.java:103) at org.eclipse.jface.action.Action.runWithEvent(Action.java:474) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:415) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4338) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1208) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4136) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3724) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:678) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:583) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:185) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:627) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1431) at org.eclipse.equinox.launcher.Main.main(Main.java:1403)