Bug 152706 - "Ctrl+D" key stroke should be prohibited in outline view
Summary: "Ctrl+D" key stroke should be prohibited in outline view
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 major
Target Milestone: 2.0   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-08-03 03:55 EDT by Tim Kan CLA
Modified: 2010-07-19 21:58 EDT (History)
1 user (show)

See Also:


Attachments
patch for not deleting Top diagram from model (1.85 KB, patch)
2006-09-12 13:26 EDT, Alex Boyko CLA
no flags Details | Diff
patch for read-only tree view (4.03 KB, patch)
2006-11-06 14:02 EST, Alex Boyko CLA
no flags Details | Diff
patch (7.27 KB, patch)
2006-11-28 09:42 EST, Alex Boyko CLA
no flags Details | Diff
patch (7.22 KB, patch)
2006-11-28 15:03 EST, Alex Boyko CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Kan CLA 2006-08-03 03:55:53 EDT
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.
Comment 1 Dmitry Stadnik CLA 2006-09-04 13:44:37 EDT
Runtime Team: could you have a look and provide comments on the issue?
Comment 2 Alex Boyko CLA 2006-09-12 11:36:24 EDT
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.
Comment 3 Alex Boyko CLA 2006-09-12 13:26:16 EDT
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.
Comment 4 Alex Boyko CLA 2006-09-12 16:13:57 EDT
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
Comment 5 Alex Boyko CLA 2006-11-06 14:02:38 EST
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.
Comment 6 Alex Boyko CLA 2006-11-28 09:42:50 EST
Created attachment 54631 [details]
patch

Merged two patches and moved calculation of selected objects to the AbstarctActionHandler.
Comment 7 Alex Boyko CLA 2006-11-28 15:03:56 EST
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.
Comment 8 Cherie Revells CLA 2006-11-29 14:23:31 EST
Committed patch.
Comment 9 Richard Gronback CLA 2008-08-13 13:10:45 EDT
[target cleanup] 2.0 M4 was the original target milestone for this bug
Comment 10 Eclipse Webmaster CLA 2010-07-19 21:58:09 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug