IntentionAction (@NotNull PsiType operandType, @NotNull PsiTypeElement checkTypeElement) { PsiPrimitiveType primitiveType = ObjectUtils.tryCast(checkTypeElement.getType(), PsiPrimitiveType.class); if (primitiveType == null) return null; PsiClassType boxedType = primitiveType.getBoxedType(checkTypeElement); if (boxedType == null || !TypeConversionUtil.areTypesConvertible(operandType, boxedType)) return null; if (primitiveType.getBoxedTypeName() == null) return null; return createReplacePrimitiveWithBoxedTypeAction(checkTypeElement, primitiveType.getPresentableText(), primitiveType.getBoxedTypeName()); }