@SuppressWarnings("LanguageMismatch")
  private static @Nullable OptPane createOptPane(UExpression body) {
    if (body instanceof UBlockExpression blockExpression) {
      List<UExpression> expressions = blockExpression.getExpressions();
      if (expressions.isEmpty()) return null;
      UExpression first = expressions.get(0);
      if (expressions.size() == 1) {
        body = first;
      }
      else if (first instanceof UDeclarationsExpression decl &&
               ContainerUtil.getOnlyItem(decl.getDeclarations()) instanceof UVariable var &&
               var.getUastInitializer() instanceof UCallExpression ctor &&
               (isConstructor(ctor, "MultipleCheckboxOptionsPanel") ||
                isConstructor(ctor, "InspectionOptionsPanel")) &&
               ContainerUtil.getLastItem(expressions) instanceof UReturnExpression returnExpression &&
               returnExpression.getReturnExpression() instanceof USimpleNameReferenceExpression ref &&
               var.equals(UastContextKt.toUElement(ref.resolve()))) {
        List<OptRegularComponent> components = new ArrayList<>();
        for (int i = 1; i < expressions.size() - 1; i++) {
          OptRegularComponent component = null;
          if (expressions.get(i) instanceof UQualifiedReferenceExpression qualRef &&
              qualRef.getReceiver() instanceof USimpleNameReferenceExpression callRef &&
              var.equals(UastContextKt.toUElement(callRef.resolve())) &&
              qualRef.getSelector() instanceof UCallExpression call) {
            // TODO: support addDependentCheckBox
            if (call.isMethodNameOneOf(List.of("addCheckbox", "addCheckboxEx"))) {
              List<UExpression> arguments = call.getValueArguments();
              if (arguments.size() == 2) {
                String bindId = getExpressionText(arguments.get(1));
                String messagePsi = getExpressionText(arguments.get(0));
                if (bindId != null && messagePsi != null) {
                  component = OptPane.checkbox(bindId, messagePsi);
                }
              }
            }
          }
          if (component == null) return null;
          components.add(component);
        }
        return new OptPane(components);
      }
    }
    if (body instanceof UReturnExpression returnExpression) {
      UExpression expression = returnExpression.getReturnExpression();
      if (expression instanceof UCallExpression ctor) {
        boolean checkbox = isConstructor(ctor, "SingleCheckboxOptionsPanel");
        boolean intField = isConstructor(ctor, "SingleIntegerFieldOptionsPanel");
        if (checkbox || intField) {
          List<UExpression> arguments = ctor.getValueArguments();
          if (arguments.size() == 3 || (intField && arguments.size() == 4)) {
            String bindId = getExpressionText(arguments.get(2));
            String messagePsi = getExpressionText(arguments.get(0));
            if (bindId != null && messagePsi != null) {
              return OptPane.pane(intField ?
                                  OptPane.number(bindId, messagePsi, Integer.MIN_VALUE, Integer.MAX_VALUE) :
                                  OptPane.checkbox(bindId, messagePsi));
            }
          }
        }
      }
    }
    return null;
  }
@SuppressWarnings("LanguageMismatch")
  private static @Nullable OptPane createOptPane(UExpression body)