@Override
  protected void doOKAction() {
    String fieldName = getEnteredName();
    String errorString = null;
    if ("".equals(fieldName)) {
      errorString = RefactoringBundle.message("no.field.name.specified");
    } else if (!PsiNameHelper.getInstance(myProject).isIdentifier(fieldName)) {
      errorString = RefactoringMessageUtil.getIncorrectIdentifierMessage(fieldName);
    }
    if (errorString != null) {
      CommonRefactoringUtil.showErrorMessage(
	IntroduceFieldHandler.getRefactoringNameText(),
	errorString,
	HelpID.INTRODUCE_FIELD,
	myProject
      );
      return;
    }

    PsiField oldField = myParentClass.findFieldByName(fieldName, true);
    if (oldField != null) {
      int answer = Messages.showYesNoDialog(
	myProject,
	RefactoringBundle.message("field.exists", fieldName,
                                   oldField.getContainingClass().getQualifiedName()),
	IntroduceFieldHandler.getRefactoringNameText(),
	Messages.getWarningIcon()
      );
      if (answer != Messages.YES) {
        return;
      }
    }

    myCentralPanel.saveFinalState();
    ourLastInitializerPlace = myCentralPanel.getInitializerPlace();
    JavaRefactoringSettings.getInstance().INTRODUCE_FIELD_VISIBILITY = getFieldVisibility();

    myNameSuggestionsManager.nameSelected();
    myTypeSelectorManager.typeSelected(getFieldType());
    super.doOKAction();
  }
@Override
  protected void doOKAction()