Exemplo n.º 1
0
 private void returnConfirmationBack() {
   if (mySystemOperation) {
     final ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject);
     final VcsShowConfirmationOption addConfirmation =
         vcsManager.getStandardConfirmation(VcsConfiguration.StandardConfirmation.ADD, null);
     addConfirmation.setValue(myAddconfirmationvalue);
     final VcsShowConfirmationOption deleteConfirmation =
         vcsManager.getStandardConfirmation(VcsConfiguration.StandardConfirmation.REMOVE, null);
     deleteConfirmation.setValue(myDeleteconfirmationvalue);
   }
 }
Exemplo n.º 2
0
    private void setConfirmationToDefault() {
      if (mySystemOperation) {
        final ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject);
        final VcsShowConfirmationOption addConfirmation =
            vcsManager.getStandardConfirmation(VcsConfiguration.StandardConfirmation.ADD, null);
        myAddconfirmationvalue = addConfirmation.getValue();
        addConfirmation.setValue(VcsShowConfirmationOption.Value.DO_ACTION_SILENTLY);

        final VcsShowConfirmationOption deleteConfirmation =
            vcsManager.getStandardConfirmation(VcsConfiguration.StandardConfirmation.REMOVE, null);
        myDeleteconfirmationvalue = deleteConfirmation.getValue();
        deleteConfirmation.setValue(VcsShowConfirmationOption.Value.DO_ACTION_SILENTLY);
      }
    }
  @Override
  protected void setToBeShown(boolean value, boolean onOk) {
    final VcsShowConfirmationOption.Value optionValue;

    if (value) {
      optionValue = VcsShowConfirmationOption.Value.SHOW_CONFIRMATION;
    } else {
      if (onOk) {
        optionValue = VcsShowConfirmationOption.Value.DO_ACTION_SILENTLY;
      } else {
        optionValue = VcsShowConfirmationOption.Value.DO_NOTHING_SILENTLY;
      }
    }

    myOption.setValue(optionValue);
  }