Bug 59698 [browser] investigate support for custom popup menu
The Browser widget for 3.0 has the following behaviour: 1. By default, expose the native popup menu if the embedded native browser exposes one (at the moment, this applies to IE only. Other browsers don't provide a 'free' default one). No custom menu can be set or modified on any platform. 2. allow apps to block the default popup menu by catching the SWT.MenuDetect event and setting the field event.doit to false. Scenario 1 is for people using the Browser to navigate HTML documents. Scenario 2 is for people using the Browser to render a portion of HTML and don't want the user to access the actions from the default popup menu. This behaviour is also consistent with the way the native Text widget provide a default popup menu. Post 3.0: Investigate support for custom popup menus.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java
private IJavaElement findJavaElement(Object element) {
		if (element == null)
			return null;
		if (SearchUtil.isISearchResultViewEntry(element)) {
			IJavaElement je= SearchUtil.getJavaElement(element);
			if (je != null)
				return je;
			element= SearchUtil.getResource(element);
		}
	
		IJavaElement je= null;
		if (element instanceof IAdaptable)
			je= (IJavaElement)((IAdaptable)element).getAdapter(IJavaElement.class);
						
		return je;
	}
	/**
	 * Finds and returns the type for the given CU.
	 * 
	 * @param cu	the compilation unit
	 * @return	the type with same name as the given CU or the first type in the CU 
	 */
	protected IType getTypeForCU(ICompilationUnit cu) {
		
		if (cu == null || !cu.exists())
			return null;
		
		
		IType primaryType= cu.findPrimaryType();
		if (primaryType != null)