Bug 120340 [implementation] Ensure IEditorInput.getAdapter(IJavaElement.class) works
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
EditorUtility.revealInEditor(part, element);
	}
	 
	/**
	 * Returns the working copy manager for the Java UI plug-in.
	 *
	 * @return the working copy manager for the Java UI plug-in
	 */
	public static IWorkingCopyManager getWorkingCopyManager() {
		return JavaPlugin.getDefault().getWorkingCopyManager();
	}
	/**
	 * Returns the Java element wrapped by the given editor input.
	 *
	 * @param editorInput the editor input
	 * @return the Java element wrapped by <code>editorInput</code> or <code>null</code> if none
	 * @since 3.2
	 */
	public static IJavaElement getEditorInputJavaElement(IEditorInput editorInput) {
		Assert.isNotNull(editorInput);
		IJavaElement je= getWorkingCopyManager().getWorkingCopy(editorInput); 
		if (je != null)
			return je;
		/*
		 * This needs work, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=120340
		 */
		return (IJavaElement)editorInput.getAdapter(IJavaElement.class);
	}
	/**
	 * Answers the shared working copies currently registered for the Java plug-in.