Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355281 - Not able to contribute popup menu to org.eclipse.jst.pagedesigner.PageDesignerEditor
Summary: Not able to contribute popup menu to org.eclipse.jst.pagedesigner.PageDesigne...
Status: NEW
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JSF Project UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 18:55 EDT by Danny Ju CLA
Modified: 2011-08-20 02:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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);