void (@NotNull PsiElement place, @NotNull PsiType expectedType) { if (myMethod.isConstructor()) { if (expectedType instanceof PsiClassType) { PsiClassType genericType = GenericsUtil.getExpectedGenericType(place, myContainingClass, (PsiClassType)expectedType); myQualifierSubstitutor = myInferenceSubstitutor = genericType.resolveGenerics().getSubstitutor(); } else { myQualifierSubstitutor = myInferenceSubstitutor = PsiSubstitutor.EMPTY; } myNeedExplicitTypeParameters = false; } else { myInferenceSubstitutor = SmartCompletionDecorator.calculateMethodReturnTypeSubstitutor(myMethod, expectedType); myNeedExplicitTypeParameters = mayNeedTypeParameters(place) && SmartCompletionDecorator.hasUnboundTypeParams(myMethod, expectedType); } myPresentableTypeArgs = myNeedExplicitTypeParameters ? getTypeParamsText(true, myMethod, myInferenceSubstitutor) : null; if (myPresentableTypeArgs != null && myPresentableTypeArgs.length() > 10) { myPresentableTypeArgs = myPresentableTypeArgs.substring(0, 10) + "...>"; } }