Bug 120340 [implementation] Ensure IEditorInput.getAdapter(IJavaElement.class) works
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* @param scope the scope that limits which types are included
	 * @param style flags defining the style of the dialog; the only valid values are
	 *   <code>IJavaElementSearchConstants.CONSIDER_CLASSES</code>,
	 *   <code>IJavaElementSearchConstants.CONSIDER_INTERFACES</code>, 
	 *   <code>IJavaElementSearchConstants.CONSIDER_ANNOTATION_TYPES</code>,
	 *   <code>IJavaElementSearchConstants.CONSIDER_ENUMS</code>,
	 *   <code>IJavaElementSearchConstants.CONSIDER_ALL_TYPES</code>,
	 *   <code>IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES</code>
	 *   <code>IJavaElementSearchConstants.CONSIDER_CLASSES_AND_ENUMS</code>. Please note that
	 *   the bitwise OR combination of the elementary constants is not supported.
	 * @param multipleSelection <code>true</code> if multiple selection is allowed
	 * @param filter the initial pattern to filter the set of types. For example "Abstract" shows 
	 *  all types starting with "abstract". The meta character '?' representing any character and 
	 *  '*' representing any string are supported. Clients can pass an empty string if no filtering
	 *  is required.
	 * @param extension a user interface extension to the type selection dialog or <code>null</code>
	 *  if no extension is desired
	 *  
	 * @return a new selection dialog
	 * 
	 * @exception JavaModelException if the selection dialog could not be opened
	 * 
	 * @since 3.2
	 */
	public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, 
			boolean multipleSelection, String filter, TypeSelectionExtension extension) throws JavaModelException {
		int elementKinds= 0;
		if (style == IJavaElementSearchConstants.CONSIDER_ALL_TYPES) {
			elementKinds= IJavaSearchConstants.TYPE;
		} else if (style == IJavaElementSearchConstants.CONSIDER_INTERFACES) {