Bug 570547

Summary: Error when removing node with Note Attachment
Product: [Modeling] Sirius Reporter: Laurent Fasani <laurent.fasani>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: maxime.porhel
Version: 6.4.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
testDeleteNodeWithNoteAttachementEcore none

Description Laurent Fasani CLA 2021-01-21 09:00:46 EST
Created attachment 285356 [details]
testDeleteNodeWithNoteAttachementEcore

Scenario:
* Open the diagram in the attached modeling project
* from diagram, delete NewEclass1
-> KO: nothing is deleted and we have the eception
Caused by: java.lang.ClassCastException: org.eclipse.gmf.runtime.notation.impl.EdgeImpl cannot be cast to org.eclipse.gmf.runtime.notation.Node
	at org.eclipse.sirius.diagram.ui.tools.internal.graphical.edit.policies.DeleteHelper$DeleteRelatedNotesTask.getSafe(DeleteHelper.java:203)


The exception occurs when a Note is attached to both the node and the edge.

The workaround is to delete one of the note attachements before deleting NewEclass1.
Comment 1 Maxime Porhel CLA 2021-01-21 09:14:30 EST
This issues looks like a duplicate of Bug 569386