Bug 525787 - The cut item in the contextual menu should be disabled when user forbided delete Edge operation
Summary: The cut item in the contextual menu should be disabled when user forbided del...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 4.1.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-10-09 21:52 EDT by Bo Zhang CLA
Modified: 2017-10-11 11:33 EDT (History)
2 users (show)

See Also:


Attachments
Test Edge (159.65 KB, application/octet-stream)
2017-10-10 22:59 EDT, Nicholas Kong CLA
no flags Details
DisableCutOnEdge (3.41 KB, application/x-zip-compressed)
2017-10-11 11:28 EDT, Laurent Fasani CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bo Zhang CLA 2017-10-09 21:52:50 EDT
When I specified 'Delete Element' in odesign file for forbidding delete Node and Edge in Diagram. and it works well, I can't delete Node and Edge.
When I right click the Node, select 'Edit', the 'cut' menu is disabled. It's OK.

But When I right click the Edge, select 'Edit', the 'cut' menu is usable. (But when I click 'cut', the edge will not be delete)
The editor did not forbid the 'cut' function of an edge.

https://www.eclipse.org/forums/index.php/t/1089311/
Comment 1 Nicholas Kong CLA 2017-10-10 22:59:53 EDT
Created attachment 270923 [details]
Test Edge

Add test edge example
Comment 2 Laurent Fasani CLA 2017-10-11 11:28:14 EDT
Created attachment 270938 [details]
DisableCutOnEdge
Comment 3 Laurent Fasani CLA 2017-10-11 11:33:11 EDT
Thanks for your submition.

I reproduced the issue on Sirius4.1.1. 

For easier analysis, I attached a project with VSP on ecore Meta model.

Steps to reproduce:
* import  DisableCutOnEdge project
* open diagram
* right click on edge
-> KO: The cut entry is available as it should not because a the delete tool with false precondition
* select edge and Ctrl + X
* select E1 node and Ctrl + V
-> KO: a new EReference is created. The cut tool acts as the copy tool