Bug 375826 - No SWT.Show event on selecting a menu from the RCP workbench
Summary: No SWT.Show event on selecting a menu from the RCP workbench
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2.1   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 391255 (view as bug list)
Depends on:
Blocks: 350080 367070
  Show dependency tree
 
Reported: 2012-04-02 06:05 EDT by Marvin Mueller CLA
Modified: 2012-10-05 15:13 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Mueller CLA 2012-04-02 06:05:29 EDT
Build Identifier: 4.2.0.v20120315-1300

We, the Jubula team, currently check the compatibility of testing 3.x
applications / plugins with e4.2 + compatibility layer and noticed that we have problems accessing menus from the Workbench and toolbar: the items / framework do not fire the SWT.Show event anymore.

To correctly synchronize with the application we make use of global filters via Display.addFilter() and SWT.Show events for menus when e.g. remote controlling those. We are using this event to check if items from the menu are shown (e.g. after a click on the menu), but for RCP workbench menus and toolbar items with sub menus these events do no longer get fired / propagated. 

This results in the problem of not being able to detect that the menu has been opened successfully, and hence cannot correctly test the workbench and toolbar item menus at all.

Does the new 4.2 UI use other events or are we missing something here?

Reproducible: Always
Comment 1 Paul Webster CLA 2012-04-02 08:47:18 EDT
They are being eaten by the framework.  MenuManager IMenuListeners are still fired, but most SWT.Show events are now consumed by org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter

PW
Comment 2 Paul Webster CLA 2012-04-10 09:09:08 EDT
(In reply to comment #0)
> Build Identifier: 4.2.0.v20120315-1300
> 
> This results in the problem of not being able to detect that the menu has been
> opened successfully, and hence cannot correctly test the workbench and toolbar
> item menus at all.
> 

Is this part of your testing framework, or part of Jubula?  What is it you're trying to do within the SWT.Show event?

PW
Comment 3 Marvin Mueller CLA 2012-04-11 09:03:29 EDT
Thank you for your response.

As our testing framework is a part of Jubula: Yes, and Yes :) 

We are using the SWT.Show event to get notified as soon as the menu is opened (so that we are able to continue testing / clicking e.g. on a sub-menu entry). If the SWT.Show event does not occur our remote control is not able to properly synchronize with the AUTs (application under test) menu expansion state.
Comment 4 Paul Webster CLA 2012-04-11 09:30:09 EDT
(In reply to comment #3)
> We are using the SWT.Show event to get notified as soon as the menu is opened
> (so that we are able to continue testing / clicking e.g. on a sub-menu entry).
> If the SWT.Show event does not occur our remote control is not able to properly
> synchronize with the AUTs (application under test) menu expansion state.

We consume SWT.Show events as part of our Eclipse4 framework (the renderers are an implementation details).  As it's a fundamental part of our renderer processing, I'll have to think if I can even address this.

PW
Comment 5 Paul Webster CLA 2012-04-16 11:48:55 EDT
Hi Marvin,

What's the impact to Jubula if I address this for Juno SR1?  I think I can modify our filter framework, but the risk at this point in the development cycle is phenomenal.

PW
Comment 6 Marvin Mueller CLA 2012-04-19 05:39:25 EDT
Hi Paul,

The impact on Jubula is that we cannot test menus from the workbench and toolbar of RCP e4 applications. 
On the other hand it has no impact on other parts of Jubula, so we are okay with it if it is addressed for Juno SR1.

MM
Comment 7 Paul Webster CLA 2012-07-26 14:06:22 EDT
Started looking at a more localized IMenuListener on pwebster/bug375826

PW
Comment 8 Paul Webster CLA 2012-07-26 21:29:27 EDT
Ok, I've pushed a prototype to pwebster/bug375826

It allows us to do Eclipse4 pre and post event processing within the MenuManager's response to those events themselves, moving it out of the filter.  That way, the SWT Show and Hide events do not have to be filtered out.

The filter is still there, it just does some simple pre-processing and then allows the events to proceed.

PW
Comment 9 Paul Webster CLA 2012-08-14 09:59:59 EDT
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=724d1d83a3b1790ae852bc1101bd7dff873a8896

Marvin, we should be able to test this after this week's M build.

PW
Comment 10 Marvin Mueller CLA 2012-08-27 03:02:04 EDT
Hey Paul,
thanks for your work.
I successfully tested this with the latest maintenance build M20120822-1200.

So its working now!

MM
Comment 11 Karen Butzke CLA 2012-10-05 15:13:01 EDT
*** Bug 391255 has been marked as a duplicate of this bug. ***