PrepopulatedCollectionModel (PsiExpression setDefinition) { setDefinition = PsiUtil.skipParenthesizedExprDown(setDefinition); if (setDefinition instanceof PsiMethodCallExpression call) { return fromCollect(call, "Set", COLLECTORS_TO_SET); } if (setDefinition instanceof PsiNewExpression newExpression) { return fromNewExpression(newExpression, "Set", JAVA_UTIL_HASH_SET); } if (setDefinition instanceof PsiReferenceExpression ref) { return fromVariable(ref, "Set", JAVA_UTIL_HASH_SET, COLLECTION_ADD); } return null; }