Clicking menu item in view toolbar button's drop down [message #491036] |
Mon, 12 October 2009 20:36  |
Eclipse User |
|
|
|
I am using:
new
SWTBot().toolbarDropDownButtonWithTooltip("Drop").menuItem( "Menu").click()
When debugging, I see the button's drop down menu open during the
notify(SWT.Selection, arrowEvent()). However, it closes when MenuFinder
sends a SWT.Show event, before bar.getItems() is called. Thus when
bar.getItems() gets called on the next line the result is empty.
Am I using it incorrectly? Or is related to the many issues with context
menus?
-Will
|
|
|
Re: Clicking menu item in view toolbar button's drop down [message #491283 is a reply to message #491036] |
Tue, 13 October 2009 19:52  |
Eclipse User |
|
|
|
Digging deeper, I found that since the menu is a CompoundContributionItem,
the MenuManager gets "dirty" when the SWT.Show event is fired. This causes
all menu items to be disposed. I have reported a bug
(http://bugs.eclipse.org/292205) with a test case attached. Let me know if
anyone has ideas to work around this!
Thanks,
Will
"Will Horn" <will.horn@gmail.com> wrote in message
news:hb0i23$mei$1@build.eclipse.org...
> I am using:
>
> new
> SWTBot().toolbarDropDownButtonWithTooltip("Drop").menuItem( "Menu").click()
>
> When debugging, I see the button's drop down menu open during the
> notify(SWT.Selection, arrowEvent()). However, it closes when MenuFinder
> sends a SWT.Show event, before bar.getItems() is called. Thus when
> bar.getItems() gets called on the next line the result is empty.
>
> Am I using it incorrectly? Or is related to the many issues with context
> menus?
>
> -Will
|
|
|
Powered by
FUDForum. Page generated in 0.03205 seconds