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

Bug 421852

Summary: Create menu operation does not include parent information
Product: [RT] RAP Reporter: Ian Bull <irbull>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: unspecified   
Target Milestone: 2.2 RC1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Proposed patch ivan: review?

Description Ian Bull CLA 2013-11-15 11:33:49 EST
When a Menu Create operation is called, the parent is not always included:

Execute Operation [CreateOperation [type=rwt.widgets.Menu, getTarget()=w74, getProperties()=Properties [propertiesMap={style=[POP_UP]}]]]

This is particularly true for POP_UP menus and SubMenus.

All menus are created in RWT with a parent, so this information should be available on the server. It would help if this information was included in the protocol.
Comment 1 Ivan Furnadjiev CLA 2013-11-18 11:09:08 EST
Created attachment 237532 [details]
Proposed patch

Render "parent" property regardless menu type (bar vs. pop-up). Menu bar which is not attached to a Shell renders zero bounds.
Comment 2 Tim Buschtoens CLA 2013-11-19 06:28:59 EST
(In reply to Ivan Furnadjiev from comment #1)
> Created attachment 237532 [details]
> Proposed patch

The client change is a clean-up and not strictly necessary. We should delay that change until after 2.2 since we are so close to the release.
Comment 3 Ralf Sternberg CLA 2013-11-19 07:03:19 EST
With this patch, the protocol misuses the bounds property to hide a menu bar in case it's removed from its parent shell. This is probably not compatible with all clients.

We agreed to include this patch for 2.2, but will come back to the menu protocol later on.
Comment 4 Ivan Furnadjiev CLA 2013-11-19 07:23:59 EST
Applied patch to master with commit 4b56385a7acdf43b09a6e16e7bb2b3bc3d0e5482.