Bug 6009 New class wizard doesn't get context right for nested classes
Build 20011106. - with a .java file open in the editor, - click the new class button - check "Enclosing Type" - the field is blank - it should default to the current type in the editor
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaModelUtil.java
return jproject.findPackageFragmentRoot(rootPath) != null;
	}
	
	
	/**
	 * Returns the package fragment root of <code>IJavaElement</code>. If the given
	 * element is already a package fragment root, the element itself is returned.
	 */
	public static IPackageFragmentRoot getPackageFragmentRoot(IJavaElement element) {
		return (IPackageFragmentRoot)findElementOfKind(element, IJavaElement.PACKAGE_FRAGMENT_ROOT);
	}
	/**
	 * Returns the first openable parent. If the given element is openable, the element
	 * itself is returned.
	 */
	public static IOpenable getOpenable(IJavaElement element) {
		while (element != null && !(element instanceof IOpenable)) {
			element= element.getParent();
		}
		return (IOpenable) element;	
	}		
	
	
	/**
	 * Returns the parent of the supplied java element that conforms to the given 
	 * parent type or <code>null</code>, if such a parent doesn't exit.
	 */
	public static IJavaElement findParentOfKind(IJavaElement element, int kind) {
		if (element == null)
			return null;