Community
Participate
Working Groups
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.
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
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.
Not enough time to contain this for 3.0, moving to Future.
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.
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
(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
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
Created attachment 116445 [details] Refined Patch Fixed the copyright headers
Keith, please review and consider the fix for M4.
Delete key works for directives and simple types in the top level view. Fix released for 3.1 M4.
Verified with I-3.1-20081124151714.
Closing.