@Override
  public void apply() throws ConfigurationException {
    myCopyrightProfile.setNotice(EntityUtil.encode(myEditor.getDocument().getText()));
    myCopyrightProfile.setKeyword(validateRegexpAndGet(myKeywordTf.getText().trim(),
                                                       CopyrightBundle.message("detect.copyright.regexp.is.incorrect.configuration.error")));
    myCopyrightProfile.setAllowReplaceRegexp(validateRegexpAndGet(myAllowReplaceTextField.getText().trim(), CopyrightBundle.message("replace.copyright.regexp.is.incorrect.configuration.error")));
    myShareProfile = mySharedCheckbox.isSelected();
    if (myShareProfile) {
      IdeCopyrightManager.getInstance().removeCopyright(myCopyrightProfile);
      CopyrightManager.getInstance(myProject).replaceCopyright(myDisplayName, myCopyrightProfile);
    }
    else {
      CopyrightManager.getInstance(myProject).removeCopyright(myCopyrightProfile);
      IdeCopyrightManager.getInstance().replaceCopyright(myDisplayName, myCopyrightProfile);
    }
    myDisplayName = myCopyrightProfile.getName();
    myModified = false;
  }
@Override
  public void apply()