Bug 570547 - Error when removing node with Note Attachment
Summary: Error when removing node with Note Attachment
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 6.4.1   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-01-21 09:00 EST by Laurent Fasani CLA
Modified: 2021-01-21 09:14 EST (History)
1 user (show)

See Also:


Attachments
testDeleteNodeWithNoteAttachementEcore (5.27 KB, application/x-zip-compressed)
2021-01-21 09:00 EST, Laurent Fasani CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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