protected JPanel createOptionsPanel() {
    final JPanel optionsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5));

    //optionsPanel.add(new JLabel("Options: "));

    createStaticOptions(optionsPanel, JavaRefactoringBundle.message("declare.static.pass.fields.checkbox"));

    myFoldParameters.setSelected(myVariableData.isFoldingSelectedByDefault());
    myFoldParameters.setVisible(myVariableData.isFoldable());
    myVariableData.setFoldingAvailable(myFoldParameters.isSelected());
    myInputVariables = myVariableData.getInputVariables().toArray(new VariableData[0]);
    myFoldParameters.addActionListener(e -> {
      myVariableData.setFoldingAvailable(myFoldParameters.isSelected());
      myInputVariables =
        myVariableData.getInputVariables().toArray(new VariableData[0]);
      updateVarargsEnabled();
      createParametersPanel();
      updateSignature();
    });
    optionsPanel.add(myFoldParameters);
    final Border emptyBorder = JBUI.Borders.empty(5, 0, 5, 4);
    myFoldParameters.setBorder(emptyBorder);

    boolean canBeVarargs = false;
    for (VariableData data : myInputVariables) {
      canBeVarargs |= data.type instanceof PsiArrayType;
    }
    if (myVariableData.isFoldable()) {
      canBeVarargs |= myVariableData.isFoldingSelectedByDefault();
    }

    if (canBeVarargs) {
      myMakeVarargs = new NonFocusableCheckBox(JavaRefactoringBundle.message("declare.varargs.checkbox"));
      myMakeVarargs.setBorder(emptyBorder);
      updateVarargsEnabled();
      myMakeVarargs.addItemListener(e -> updateSignature());
      myMakeVarargs.setSelected(false);
      optionsPanel.add(myMakeVarargs);
    }

    if (myNullability != null && myNullability != Nullability.UNKNOWN) {
      final boolean isSelected = PropertiesComponent.getInstance(myProject).getBoolean(EXTRACT_METHOD_GENERATE_ANNOTATIONS, true);
      myGenerateAnnotations = new JCheckBox(JavaRefactoringBundle.message("declare.generated.annotations"), isSelected);
      myGenerateAnnotations.addItemListener(e -> updateSignature());
      optionsPanel.add(myGenerateAnnotations);
    }

    if (myCbChainedConstructor != null) {
      optionsPanel.add(myCbChainedConstructor);
      myCbChainedConstructor.setBorder(emptyBorder);
      myCbChainedConstructor.addItemListener(e -> {
        if (myDefaultVisibility) {
          myChangingVisibility = true;
          try {
            if (isChainedConstructor()) {
              myVisibilityPanel.setVisibility(VisibilityUtil.getVisibilityModifier(myTargetClass.getModifierList()));
            }
            else {
              myVisibilityPanel.setVisibility(PsiModifier.PRIVATE);
            }
          }
          finally {
            myChangingVisibility = false;
          }
        }
        update();
      });
    }
    return optionsPanel;
  }
protected JPanel createOptionsPanel()