@Nullable
  private static String getSwitchCaseTextWithComparedPrimitives(@NotNull PsiPolyadicExpression expression) {
    PsiExpression switchSelector = findSelectorWithComparedPrimitives(expression);
    if (switchSelector == null) return null;
    PsiType switchSelectorType = switchSelector.getType();
    if (switchSelectorType == null) return null;

    StringBuilder stringBuilder = new StringBuilder();
    String name = new VariableNameGenerator(switchSelector, VariableKind.LOCAL_VARIABLE).byType(
      switchSelectorType).generate(true);
    String typeText = switchSelectorType.getPresentableText();
    stringBuilder.append(typeText).append(" ").append(name).append(" when ");
    for (PsiElement child : expression.getChildren()) {
      if (child instanceof PsiBinaryExpression childBinaryExpression) {
        for (PsiElement binaryChild : childBinaryExpression.getChildren()) {
          if (binaryChild == switchSelector) {
            stringBuilder.append(name);
          }
          else {
            stringBuilder.append(binaryChild.getText());
          }
        }
      }
      else {
        if (child == switchSelector) {
          stringBuilder.append(name);
        }
        else {
          stringBuilder.append(child.getText());
        }
      }
    }
    return stringBuilder.toString();
  }
@Nullable
  private static String getSwitchCaseTextWithComparedPrimitives(@NotNull PsiPolyadicExpression expression)