Community
Participate
Working Groups
Confirm below que first: The generated outline provider is "readonly"? just because, all the "action"s in Edit menu are disabled except the "Delete"(another bug?), also no content-sensitive menu. If true, it will be trouble, with "Ctrl+D" key stroke, which will delete the selected figure on diagram. Furthermore, when select the top element(canvas), then "Ctrl+D", all figures are deleted on diagram, but in ourline tree, only first element is removed.
Runtime Team: could you have a look and provide comments on the issue?
Indeed the outline view (tree view) only supports the delete command currently. There is no content sensitive menu on the tree view as well. I agree that there is a problem with "Ctrl+D" key stroke when the diagram tree widget is selected in the tree viewer - user should not be able to delete diagram from the tree viewer.
Created attachment 49951 [details] patch for not deleting Top diagram from model Here is the patch that solves the problem. "Ctrl+D" key stroke in GMF stands for deleting selected elements from model. The fix doesn't allow deletions of top diagrams from models. Although, we were allowing this before, from the way client applications deal with it seems that this behavior is not desirable (i.e. popup menus don't have "Delete from Model" item). Hence, with this fix, if top diagram edit part is selected and "Ctrl+D" is pressed, the diagram won't be deleted from the model.
We do not know whether we will support dletion from the tree view or not, hence not sure if need to completely remove "delete" functionality from the tree view items or fix it. The complete fix for this bug will be uploaded as soon as the decision is made. The patch uploaded for this bug is still relevent for the issue of deleting the top most diagram
Created attachment 53317 [details] patch for read-only tree view Proposed patch for read-only tree view. Modified the calculation of selected objects. Currently the selection for prompting delete from model action is captured from the graphical viewer although it may not be active. Hence, the patch will get the selected objects from the current active window.
Created attachment 54631 [details] patch Merged two patches and moved calculation of selected objects to the AbstarctActionHandler.
Created attachment 54669 [details] patch Put the checks for unresolved elements and diagram semantic element back into DeleteFromModelAction in order not to alter the behavior of client applications.
Committed patch.
[target cleanup] 2.0 M4 was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component Runtime was the original product and component for this bug