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
}
		IPath packPath;
		if (pack.length() > 0) {
			packPath= new Path(pack.replace('.', '/'));
		} else {
			packPath= new Path(""); 
		}
		
		IPath path= packPath.append(typeQualifiedName.substring(0, dot) + ".java"); 
		IJavaElement elem= jproject.findElement(path);
		if (elem instanceof ICompilationUnit) {
			return findTypeInCompilationUnit((ICompilationUnit)elem, typeQualifiedName);
		} else if (elem instanceof IClassFile) {
			path= packPath.append(typeQualifiedName.replace('.', '$') + ".class"); 
			elem= jproject.findElement(path);
			if (elem instanceof IClassFile) {
				return ((IClassFile)elem).getType();
			}
		}
		return null;
	}
	
	/**
	 * Finds a type container by container name.
	 * The returned element will be of type <code>IType</code> or a <code>IPackageFragment</code>.
	 * <code>null</code> is returned if the type container could not be found.
	 * @param jproject The Java project defining the context to search
	 * @param typeContainerName A dot separarted name of the type container
	 * @see #getTypeContainerName()
	 */