Bug 31720 Browsing views should add listener to page [Browsing]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
*/
	protected IJavaElement getElementForInputAt(IEditorInput input, int offset) {
		if (input instanceof IClassFileEditorInput) {
			try {
				return ((IClassFileEditorInput)input).getClassFile().getElementAt(offset);
			} catch (JavaModelException ex) {
				return null;
			}
		}
		IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
		ICompilationUnit unit= manager.getWorkingCopy(input);
		if (unit != null)
			try {
				unit.reconcile();
				return unit.getElementAt(offset);
			} catch (JavaModelException ex) {
			}
		return null;
	}
	
	protected IType getTypeForCU(ICompilationUnit cu) {
		cu= (ICompilationUnit)getSuitableJavaElement(cu);
		
		
		IType primaryType= cu.findPrimaryType();
		if (primaryType != null)
			return primaryType;
		
		try {
			IType[] types= cu.getTypes();