Project: Eclipse_Platform_UI
Bug 74982 [Commands] Select All accelerator is available on a Tree control hosted in a TreeViewer but does not send SelectionChanged events
Reported: 2004-09-24 14:26:12 | Status: verified fixed

Select All accelerator is available on a Tree control hosted in a TreeViewer but does not send SelectionChanged events. That means: 1) The user thinks that everything is OK because the items are selected in the tree. 2) The TreeViewer is not aware of the new selection and when asked about the selected elements, returns the old selection. 3) Any code depending on the selection changed event (for example, for enablement of controls) is broken. I have tracked this down to the org.eclipse.ui.internal.commands.ws.SelectAllHandler class which calls the selectAll() method in the Tree widget but ignores the TreeViewer were the widget is hosted - the real source of the events. This can be worked around if the widget (and its associated viewer) is hosted in a view/editor by redefining the action but can hardly be done when the widget is used in a dialog box.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ws/SelectAllHandler.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74982Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandsTestSuite.java