Bug 40780 [plan item] Improve context views
Declaration View and Javadoc View should compute their contents in background Both should provide a context menu containing at least Copy and F3 (where available).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java
return null;
		}
			
		return findJavaElement(element);
	}
	/**
	 * Tries to get a Java element out of the given element.
	 * 
	 * @param element an object
	 * @return the Java element represented by the given element or <code>null</code>
	 */
	protected IJavaElement findJavaElement(Object element) {
		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);
			
		if (je != null && je.getElementType() == IJavaElement.COMPILATION_UNIT)
			je= WorkingCopyUtil.getWorkingCopyIfExists((ICompilationUnit)je);
			
		return je;
	}
	/**
	 * Finds and returns the type for the given CU.