Bug 201965 - [Schema][Editors] Inappropriate selection behaviour after delete attempt in non-editable editor
Summary: [Schema][Editors] Inappropriate selection behaviour after delete attempt in n...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Remy Suen CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2007-08-31 17:37 EDT by Mike Pawlowski CLA
Modified: 2007-10-30 15:43 EDT (History)
3 users (show)

See Also:


Attachments
Patch to implement the suggested behaviour. (995 bytes, patch)
2007-10-02 19:38 EDT, Remy Suen CLA
no flags Details | Diff
mylyn/context/zip (877 bytes, application/octet-stream)
2007-10-03 12:03 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Pawlowski CLA 2007-08-31 17:37:29 EDT
Eclipse version >= Build id: I20070828-0800

Steps To Reproduce:

(1) Open "org.eclipse.pde.doc.user" manifest file
(2) Go to "Extensions" page
(3) Select "org.eclipse.help.toc"
(4) Click the "Open extension point schema" hyperlink
(5) Go to the "Definition" page
(6) Try deleting extensions, elements or attributes
    -> BUG: Tree viewer object selection changes as if the object was 
       deleted
    -> EXPECTED:  Selection does not change and the 'default' sound 
       is heard (beep)
    -> After a number of attribute deletion attempts the following
       exception occurs

java.lang.ArrayIndexOutOfBoundsException: -2
	at org.eclipse.pde.internal.ui.editor.schema.ElementSection.handleAttributeDelete(ElementSection.java:466)
	at org.eclipse.pde.internal.ui.editor.schema.ElementSection.handleDelete(ElementSection.java:406)
	at org.eclipse.pde.internal.ui.editor.schema.ElementSection.handleDelete(ElementSection.java:377)
	at org.eclipse.pde.internal.ui.editor.schema.ElementSection.doGlobalAction(ElementSection.java:255)
	at org.eclipse.pde.internal.ui.editor.PDEFormPage.performGlobalAction(PDEFormPage.java:215)
	at org.eclipse.pde.internal.ui.editor.PDEFormEditor.performGlobalAction(PDEFormEditor.java:822)
Comment 1 Brian Bauman CLA 2007-09-05 17:27:20 EDT
Marking this as bugday.  We should be able to prevent the selection change by exiting/returning immediately when the editor is non-editable.
Comment 2 Remy Suen CLA 2007-10-02 19:38:45 EDT
Created attachment 79603 [details]
Patch to implement the suggested behaviour.
Comment 3 Chris Aniszczyk CLA 2007-10-02 21:19:15 EDT
Remy is so smart.
Comment 4 Chris Aniszczyk CLA 2007-10-03 12:03:26 EDT
thanks Remy!
Comment 5 Chris Aniszczyk CLA 2007-10-03 12:03:31 EDT
Created attachment 79650 [details]
mylyn/context/zip
Comment 6 Brian Bauman CLA 2007-10-30 15:43:55 EDT
Verified on I20071030-0800