Bug 553498

Summary: [ELK] NPE when using "Reset style properties to default value" on an edge layouted with ELK
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: pierre-charles.david
Version: 6.3.0Keywords: triaged
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
stacktrace.txt none

Description Laurent Redor CLA 2019-11-26 11:28:36 EST
Created attachment 280790 [details]
stacktrace.txt

Steps to reproduce:
* Using data of bug 538933
* Launch an arrange all
* A style as below is added to each edge:
    <styles xmi:type="notation:StringValueStyle" xmi:id="_0SafJAYkEeqevcOEw7ZVVg" name="junctionPoints" stringValue="()"/>
* Select an edge
* Click on "Reset style properties to default value"
* Save
* Launch another arrange all --> NPE is thrown (see stacktrace.txt for the full stacktrace):
	Caused by: java.lang.NullPointerException
	at org.eclipse.gmf.runtime.notation.impl.ViewImpl.getNamedStyle(ViewImpl.java:496)
	at org.eclipse.sirius.diagram.elk.GmfLayoutCommand.doExecuteWithResult(GmfLayoutCommand.java:227)...


After using the "Reset style properties to default value", only 
	<styles xmi:type="notation:StringValueStyle" xmi:id="xxx"/>
remains and this explains the NPE.