void (final @NotNull PsiNewExpression expression) { super.visitNewExpression(expression); final PsiType superClassType = expression.getType(); if (PsiUtil.resolveClassInType(superClassType) == mySuperClass) { PsiSubstitutor subst = getSuperClassSubstitutor(superClassType, targetClassType, resolveHelper, targetClass); try { final String typeCanonicalText = elementFactory.createType(targetClass, subst).getCanonicalText(); final PsiJavaCodeReferenceElement classReference = expression.getClassOrAnonymousClassReference(); if (classReference != null) { replacementMap.put(new UsageInfo(classReference), elementFactory.createReferenceFromText(typeCanonicalText, expression)); } } catch (IncorrectOperationException e) { LOG.error(e); } } }