if (type.isArray() && type.getElementType().isPrimitive())
if (type.isArray() && type.getElementType().isPrimitive()) return null; final IPackageBinding pack= type.getPackage(); final IPackageDeclaration[] declarations= fCu.getPackageDeclarations(); if (pack != null && declarations.length > 0 && pack.getName().equals(declarations[0].getElementName()))
	private TextEdit createImportEditIfNeeded(TextBuffer buffer) throws CoreException {		final Expression expression= getSelectedExpression().getAssociatedExpression();		if (expression instanceof ClassInstanceCreation) {			final ClassInstanceCreation creation= (ClassInstanceCreation) expression;			final Type type= creation.getType();			if (type.isQualifiedType())				return null;			if (type instanceof SimpleType && ((SimpleType) type).getName().isQualifiedName())				return null;			if (type instanceof ParameterizedType) {				final Type raw= ((ParameterizedType) type).getType();				if (raw instanceof SimpleType && ((SimpleType) raw).getName().isQualifiedName())					return null;			}		}		final ITypeBinding type= expression.resolveTypeBinding();		if (type.isPrimitive())			return null;		if (type.isArray() && type.getElementType().isPrimitive())				return null;		final ImportRewrite rewrite= new ImportRewrite(fCu);		rewrite.addImport(type);		if (rewrite.isEmpty())			return null;		else				return rewrite.createEdit(buffer.getDocument());	}