Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 519142

Summary: [aird editor] Possible NPE when the aird editor is opened through Memento on an aird "of the future"
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: CoreAssignee: Florian Barbin <florian.barbin>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: florian.barbin, julien.dupont, pierre-charles.david
Version: 5.0.0Keywords: triaged
Target Milestone: 5.1.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/104900
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2eb4fd7a04475038868466eb923e38f0ac49379f
Whiteboard: backport aird_editor ux

Description Laurent Redor CLA 2017-07-04 05:16:58 EDT
Steps to reproduce:
* Create a modeling project
* The aird editor is automatically opened.
* Close Eclipse.
* Edit the aird file with a text editor, and set the version of the DAnalysis to a future version ("100.0.0" for example).
* Start Eclipse
* KO: NPE

Corresponding Stack:
java.lang.NullPointerException
	at org.eclipse.sirius.ui.editor.internal.pages.DefaultSessionEditorPage.createFormContent(DefaultSessionEditorPage.java:146)
	at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:166)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:163)
	at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:480)
	at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1102)
	

I think that a message like in representation must be added in the aird editor in this context. For example in diagram editor: org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl.createPartControl(Composite).
Comment 1 Florian Barbin CLA 2017-07-05 04:21:06 EDT
issue reproduced with Sirius 5.0.1
Comment 2 Eclipse Genie CLA 2017-09-11 11:25:24 EDT
New Gerrit change created: https://git.eclipse.org/r/104900
Comment 4 Pierre-Charles David CLA 2017-11-08 03:37:23 EST
Available in Sirius 5.1.0, see https://wiki.eclipse.org/Sirius/5.1.0.