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

Bug 355281

Summary: Not able to contribute popup menu to org.eclipse.jst.pagedesigner.PageDesignerEditor
Product: [WebTools] Java Server Faces Reporter: Danny Ju <danny.ju>
Component: UIAssignee: JSF Project UI <jsf.ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: thatnitind
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Danny Ju CLA 2011-08-19 18:55:21 EDT
Build Identifier: I20110613-1736

Define a popup menu targeting to any context menu for Web Page Designer

 <extension point="org.eclipse.ui.popupMenus"> 
   <viewerContribution 
   		id="oracle.eclipse.tools.adf.debugger.ui.popup.htmlEditor"
	   	targetID="HTMLVisualEditor.contextMenu" >

At runtime, the menu is not showing up

Reproducible: Always
Comment 1 Danny Ju CLA 2011-08-19 19:00:52 EDT
The bug seems to be caused by this no-op in:

org.eclipse.jst.pagedesigner.ui.common.sash.SashEditorSite

	public void registerContextMenu(String menuID, MenuManager menuMgr,
			ISelectionProvider selProvider) {
//		if (_menuExtenders == null) {
//			_menuExtenders = new ArrayList(1);
//		}
		// cancel the registration of PopupMenuExtender since the
		// PopupMenuExtender's behavior
		// is different between eclipse 3.0 and eclipse 3.1,and we always have
		// one context
		// menu listener,no need add PopupMenuExtender as the second
		// listener(workaroud for bug 408295-1)
		// _menuExtenders.add(new PopupMenuExtender(menuID, menuMgr,
		// selProvider,
		// _editor));
	}

The SashEditorSite should call PartSite.registerContextMenu()

		if (menuExtenders == null) {
			menuExtenders = new ArrayList(1);
		}
		PartSite.registerContextMenu(menuID, menuMgr, selProvider, true,
				editor, menuExtenders);