public void reset() {
    final TextWithImports emptyExpressionFragment = new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, "");
    ((CardLayout)getLayout()).show(this, myRenderer == null ? EMPTY_PANEL_ID : DATA_PANEL_ID);
    if (myRenderer == null) {
      return;
    }
    final String className = myRenderer.getClassName();
    myClassNameField.setText(className);

    updateContext(className);

    final ValueLabelRenderer labelRenderer = myRenderer.getLabelRenderer();
    final ChildrenRenderer childrenRenderer = myRenderer.getChildrenRenderer();

    myShowTypeCheckBox.setSelected(myRenderer.isShowType());

    if (myRenderer.isBaseRenderer(labelRenderer)) {
      myLabelEditor.setExpression(TextWithImportsImpl.toXExpression(emptyExpressionFragment));
      myRbDefaultLabel.setSelected(true);
      myOnDemandCheckBox.setSelected(false);
    }
    else {
      myRbExpressionLabel.setSelected(true);
      LabelRenderer lr = (LabelRenderer)labelRenderer;
      myLabelEditor.setExpression(TextWithImportsImpl.toXExpression(lr.getLabelExpression()));
      myOnDemandCheckBox.setSelected(lr.isOnDemand());
    }

    getTableModel().clear();
    myAppendDefaultChildren.setSelected(false);

    if (myRenderer.isBaseRenderer(childrenRenderer)) {
      myRbDefaultChildrenRenderer.setSelected(true);
      myChildrenEditor.setExpression(TextWithImportsImpl.toXExpression(emptyExpressionFragment));
      myChildrenExpandedEditor.setExpression(TextWithImportsImpl.toXExpression(emptyExpressionFragment));
    }
    else if (childrenRenderer instanceof ExpressionChildrenRenderer exprRenderer) {
      myRbExpressionChildrenRenderer.setSelected(true);
      myChildrenEditor.setExpression(TextWithImportsImpl.toXExpression(exprRenderer.getChildrenExpression()));
      myChildrenExpandedEditor.setExpression(TextWithImportsImpl.toXExpression(exprRenderer.getChildrenExpandable()));
    }
    else {
      myRbListChildrenRenderer.setSelected(true);
      myChildrenEditor.setExpression(TextWithImportsImpl.toXExpression(emptyExpressionFragment));
      myChildrenExpandedEditor.setExpression(TextWithImportsImpl.toXExpression(emptyExpressionFragment));
      if (childrenRenderer instanceof EnumerationChildrenRenderer enumerationRenderer) {
        getTableModel().init(enumerationRenderer.getChildren());
        myAppendDefaultChildren.setSelected(enumerationRenderer.isAppendDefaultChildren());
      }
    }

    updateEnabledState();
  }
public void reset()