Bug 5449 TVT Text Expansion/Truncations in new java class dialog
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
fCurrEnclosingType= null;
		
		IPackageFragmentRoot root= getPackageFragmentRoot();
		
		fEnclosingTypeDialogField.enableButton(root != null);
		if (root == null) {
			status.setError(""); 
			return status;
		}
		
		String enclName= getEnclosingTypeText();
		if (enclName.length() == 0) {
			status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeEnterName")); 
			return status;
		}
		try {
			IType type= JavaModelUtil.findType(root.getJavaProject(), enclName);
			if (type == null) {
				status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists")); 
				return status;
			}
			if (type.getCompilationUnit() == null) {
				status.setError(NewWizardMessages.getString("TypePage.error.EnclosingNotInCU")); 
				return status;
			}
			fCurrEnclosingType= type;
			return status;
		} catch (JavaModelException e) {
			status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists")); 
			JavaPlugin.log(e.getStatus());