| Summary: | [Protocol] Context menu does not show for Composite | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Austin Riddle <austin.riddle> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | ||
| Version: | 1.5 | ||
| Target Milestone: | 1.5 M2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Reproducible with Controls Demo -> Button tab. There is a context menu set on the buttons parent composite. "menu" is missing from AdapterUtil.js#_controlProperties and AdapterUtil.js#_controlPropertyHandler. More over, WidgetUtilLCA#renderMenu will fail with NPE in case of null menu (resetting menu to null). Fixed by adding "menu" to AdapterUtil.js#_controlProperties and AdapterUtil.js#_controlPropertyHandler. NPE in WidgetUtilLCA#renderMenu is fixed too. JUnit and JS tests added. Changes are in CVS HEAD. |
Version: CVS HEAD Registered context menus on composites no longer show when you right click. Was working in 1.4. Snippet: Composite comp = new Composte(parent, SWT.NONE); MenuManager menuMgr = new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); AddSlotAction addAction = new AddSlotAction(desc); manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, addAction); } }); Menu m = menuMgr.createContextMenu(comp); comp.setMenu(m);