Bug 158753 - [Editor] Unable to delete simple types and directives with the keyboard in the top level view
Summary: [Editor] Unable to delete simple types and directives with the keyboard in th...
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsd (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Steven Hung CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard: EaseOfUse
Keywords: accessibility, contributed
Depends on:
Blocks: 251557
  Show dependency tree
 
Reported: 2006-09-26 10:12 EDT by Valentin Baciu CLA
Modified: 2009-01-06 13:26 EST (History)
0 users

See Also:


Attachments
Patch (27.24 KB, patch)
2008-10-29 12:47 EDT, Steven Hung CLA
valentinbaciu: iplog+
Details | Diff
Refined Patch (31.86 KB, patch)
2008-10-29 13:10 EDT, Steven Hung CLA
valentinbaciu: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Baciu CLA 2006-09-26 10:12:04 EDT
The issue seems to be in the DeleteAction. The adapter interfaces need to be enhanced a bit to make this type of action work for directives and simple types.
Comment 1 Valentin Baciu CLA 2006-09-26 10:14:05 EDT
This is leftover work which could not be done in 1.5.1 because of the need to change some interfaces. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=150985
Comment 2 Keith Chong CLA 2008-04-24 09:28:38 EDT
This generic delete action needs to reference XSD specific components although, it's supposed to work on facade interfaces.  This would require implementing new interfaces for these XSD components.  The problem is that the facade was constructed specifically for certain XSD components (types, elements).  Adding new interfaces would be risky at this point.

Alternatively, the delete action can possibly be made more 'extensible' to delegate non-facade components to any extending delete actions...I will investigate this for post 3.0 M7.
Comment 3 Valentin Baciu CLA 2008-05-11 19:26:13 EDT
Not enough time to contain this for 3.0, moving to Future.
Comment 4 Valentin Baciu CLA 2008-10-24 14:58:56 EDT
Some other components like sequence, choice, all cannot be deleted with the keyboard in the complex type figure. Perhaps the cause is similar? If not we need a new bug.
Comment 5 Steven Hung CLA 2008-10-28 15:49:33 EDT
I am having trouble deleting elements in a newly created complex type.

To reproduce:
1) Open GolfCountryClub/GolfCountryClub.xsd
2) Create a new complex type
3) Add a few elements
4) Use the delete key on these newly created elements and nothing happens
5) Save, close the file, and re-open
6) Now delete the same elements using the keyboard and it works

Note: instead of closing the file, if you swap between the design and source view, the delete key works again
Comment 6 Steven Hung CLA 2008-10-28 18:13:08 EDT
(In reply to comment #5)
> I am having trouble deleting elements in a newly created complex type.
> 
> To reproduce:
> 1) Open GolfCountryClub/GolfCountryClub.xsd
> 2) Create a new complex type
> 3) Add a few elements
> 4) Use the delete key on these newly created elements and nothing happens
> 5) Save, close the file, and re-open
> 6) Now delete the same elements using the keyboard and it works
> 
> Note: instead of closing the file, if you swap between the design and source
> view, the delete key works again
> 

The bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=252509 has been opened against this problem
Comment 7 Steven Hung CLA 2008-10-29 12:47:53 EDT
Created attachment 116441 [details]
Patch

Added keyboard deletion functionality for all possible deletions by the "right click + delete" method.  A new interface, IXSDObject, was created to simplify the removal of items via DeleteAction.  This interface is implemented by all the adapters that need to be removed via the keyboard delete key.

Please note the simple type deletion bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=252589 and the inconsistent deletion bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=252509
Comment 8 Steven Hung CLA 2008-10-29 13:10:06 EDT
Created attachment 116445 [details]
Refined Patch

Fixed the copyright headers
Comment 9 Valentin Baciu CLA 2008-10-30 19:36:32 EDT
Keith, please review and consider the fix for M4.
Comment 10 Keith Chong CLA 2008-11-12 16:54:57 EST
Delete key works for directives and simple types in the top level view.

Fix released for 3.1 M4. 
Comment 11 Valentin Baciu CLA 2008-11-25 14:08:59 EST
Verified with I-3.1-20081124151714.
Comment 12 Valentin Baciu CLA 2008-11-25 14:09:49 EST
Closing.