Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Clicking menu item in view toolbar button's drop down
Clicking menu item in view toolbar button's drop down [message #491036] Tue, 13 October 2009 00:36 Go to next message
Will Horn is currently offline Will Horn
Messages: 265
Registered: July 2009
Senior Member
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 23:52 Go to previous message
Will Horn is currently offline Will Horn
Messages: 265
Registered: July 2009
Senior Member
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
Previous Topic:Timeout Question
Next Topic:Secure Storage & StorageLoginDialog
Goto Forum:
  


Current Time: Tue Sep 23 10:27:47 GMT 2014

Powered by FUDForum. Page generated in 0.02328 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software