Bug 5449 TVT Text Expansion/Truncations in new java class dialog
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
/**
	 * Initializes all fields provided by the type page with a given
	 * Java element as selection.
	 * @param elem The initial selection of this page or null if no
	 *             selection was available
	 */
	protected void initTypePage(IJavaElement elem) {
		String initSuperclass= "java.lang.Object"; 
		ArrayList initSuperinterfaces= new ArrayList(5);
		IPackageFragment pack= null;
		IType enclosingType= null;
				
		if (elem != null) {
			
			pack= (IPackageFragment) JavaModelUtil.findElementOfKind(elem, IJavaElement.PACKAGE_FRAGMENT);
			IType typeInCU= (IType) JavaModelUtil.findElementOfKind(elem, IJavaElement.TYPE);
			if (typeInCU != null) {
				if (typeInCU.getCompilationUnit() != null) {
					enclosingType= typeInCU;
				}
			} else {
				ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(elem, IJavaElement.COMPILATION_UNIT);
				if (cu != null) {
					enclosingType= JavaModelUtil.findPrimaryType(cu);
				}
			}
			
			try {
				IType type= null;