void (@NotNull ActionContext context, @NotNull PsiExpression element, @NotNull ModPsiUpdater updater) { PsiExpression expression = getParentExpression(element); PsiClass psiClass = PsiUtil.resolveClassInClassTypeOnly(expression.getType()); if (psiClass != null) { PsiClass expectedClass = PsiUtil.resolveClassInClassTypeOnly(getExpectedType(expression)); if (expectedClass != null) { String collectionClass = findSuperClass(psiClass, expectedClass, CLASS_TO_METHOD.keySet()); if (collectionClass != null) { String method = CLASS_TO_METHOD.get(collectionClass); wrapWith(expression, method); } } } }