Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 279972

Summary: [Tree] ENTER does not notify widget default selected
Product: [RT] RAP Reporter: Elias Volanakis <elias>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan, nobody
Version: 1.2   
Target Milestone: 1.3 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Snippet to reproduce bug
none
Patch that enable widgetDefaultSelected event on ENTER key.
none
Updated patch to respect Windows behavior about expand/collapse on ENTER key. none

Description Elias Volanakis CLA 2009-06-11 12:33:28 EDT
Created attachment 138948 [details]
Snippet to reproduce bug

Issue: Hitting ENTER on a TreeItem will not notify SelectionListener.widgetDefaultSelected(e).

Note that this works normally on the TableItem. Looks like a bug to me.

Use attached snippet to reproduce.
Comment 1 Ivan Furnadjiev CLA 2009-06-12 07:16:52 EDT
Created attachment 139016 [details]
Patch that enable widgetDefaultSelected event on ENTER key.

Small change in the Controls Demo TreeTab is included too.
Comment 2 Elias Volanakis CLA 2009-06-12 22:32:53 EDT
Thanks Ivan!

Works well.
Comment 3 Elias Volanakis CLA 2009-06-25 11:16:14 EDT
The patch causes the tree to show empty nodes occasionally.

Jordan, is it possible to provide a snippet?
Comment 4 Nobody - feel free to take it CLA 2009-06-25 11:59:02 EDT
Actually this issue should be fixed. I am trying to reproduce another bug that has obviously nothing to do with this one.
Comment 5 Elias Volanakis CLA 2009-06-25 15:58:46 EDT
Jordan,

not sure what you mean with the previous comment.

> The patch causes the tree to show empty nodes occasionally.

Is this still an issue? Please clarify.

Thanks,
Elias.

Comment 6 Nobody - feel free to take it CLA 2009-06-26 02:22:03 EDT
Morning Elias,

From my point of view this bug is fixed.

The empty nodes are possibly another bug, that I am trying to reproduce right now, but the ENTER key works fine, so please resolve here.

PS: It is not that I havent found anything... :-) Have a look under https://bugs.eclipse.org/bugs/show_bug.cgi?id=281534

Greetings
Jordan
Comment 7 Ivan Furnadjiev CLA 2009-06-26 05:52:06 EDT
One note: On Windows the ENTER key does not expand/collapse the tree folder. On Linux it does.
Comment 8 RĂ¼diger Herrmann CLA 2009-06-26 06:05:18 EDT
Let's stay with Windows. Fire a widgetDefaultSelected but don't collapse/expand the tree item.
Once the default-selection event is fired, it is still possible to expand/collapse the item from the application code.
Comment 9 Ivan Furnadjiev CLA 2009-06-26 06:32:41 EDT
Created attachment 140213 [details]
Updated patch to respect Windows behavior about expand/collapse on ENTER key.
Comment 10 Elias Volanakis CLA 2009-06-26 16:20:55 EDT
The recent patch fixes the 'expand' state but disables the notification of SelectionListener.widgetDefaultSelected (which was the mean reason for this issue).

Please provide an update.
Comment 11 Ivan Furnadjiev CLA 2009-06-26 17:09:38 EDT
Elias, I've just check it and the SelectionListener.widgetDefaultSelected is fired as expected with latest patch. Please provide more information.
Comment 12 Elias Volanakis CLA 2009-06-26 17:26:25 EDT
Ok, it was my fault the first time. I reverted to the original file and reapplied the patch. It works! :-)

Comment 13 Ivan Furnadjiev CLA 2009-07-07 04:28:49 EDT
Changes are in CVS HEAD.