Home » Eclipse Projects » Eclipse 4 » Need help for SWTBot with Menus, and e4 in general
Need help for SWTBot with Menus, and e4 in general [message #899578] |
Wed, 01 August 2012 09:48  |
Eclipse User |
|
|
|
Hi,
We want SWTBot to work with Eclipse 4.2. We started a new development
stream, and have noticed that SWTBot is still compatible with Eclipse
4.2 without any change.
However, the "Eclipse Finder" in SWTBot, which is responsible for
manipulating workbech concepts (such as views & so on), has several
incompatibilites with Eclipse 4.2. One of them is about Views menus:
Before, with 3.x, the MenuManager for a view used to contain all the
contributed stuff in the menu. Now, it seems to be filled in a lazy way,
so that we can't query it to find menus for views.
I think there may be a way to use a SWT.MenuDetect event on the menu
widget, but I did not find a way to retrieve this menu widget.
Do you have any suggestion on how to ensure MenuManager gets populated
before querying it?
The general issue is where should SWTBot place itself for the Eclipse
Finder? Now there is the modeled workbench and the renderers, so should
SWTBot simply trigger the modeled workbench? Would it allow so many
useful operations as SWTBot used to provide with 3.x? Or should SWTBot
used the rendered workbench, and then rely on the renderer (which may
change) ? In such case, do you agree that would mean implement 1 Finder
for each renderer ?
Your help is very welcome, here or on the SWTBot mailing list.
Cheers,
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
|
|
| | | | | | |
Re: Need help for SWTBot with Menus, and e4 in general [message #904903 is a reply to message #902837] |
Wed, 29 August 2012 06:58  |
Eclipse User |
|
|
|
Paut, Sopot,
Here is a bug to track the kind of issues we met with e4 menu in SWTBot:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=388306
I'd appreciate if you could find some time to give a hint. The general
issue seems to be menus not populated correctly. SWTBot menu handling is
all about sending Show and Hide events, we probably need another way to
do it for e4, and add some more events to ensure menus get populated.
On 08/20/2012 07:51 PM, Paul Webster wrote:
> I'll just add that
> org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showMenuButton(MPart,
> CTabFolder, MMenu) is the starting point for how we use the view menu
> MMenu, and do to the strangeness of the 3.x API and which part of the
> framework owns what,
> org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(IWorkbenchPart,
> Composite) shows us hooking up a MenuManager to the view menu MMenu.
>
> PW
>
>
>
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
|
|
|
Goto Forum:
Current Time: Wed Jul 23 18:28:59 EDT 2025
Powered by FUDForum. Page generated in 0.03387 seconds
|