use of com.intellij.openapi.options.CancelledConfigurationException in project intellij-community by JetBrains.
the class UpdateOptionsPanel method apply.
public void apply() throws ConfigurationException {
CvsConfiguration configuration = CvsConfiguration.getInstance(myProject);
configuration.CLEAN_COPY = false;
if (myCleanCopy.isSelected()) {
if (Messages.showYesNoDialog(CvsBundle.message("confirmation.clean.copy"), CvsBundle.message("confirmation.title.clean.copy"), Messages.getWarningIcon()) == Messages.YES) {
configuration.CLEAN_COPY = true;
} else {
throw new CancelledConfigurationException();
}
}
configuration.PRUNE_EMPTY_DIRECTORIES = myPruneEmptyDirectories.isSelected();
configuration.MERGING_MODE = getSelected(myMergingGroup);
configuration.MERGE_WITH_BRANCH1_NAME = myBranch.getText();
configuration.MERGE_WITH_BRANCH2_NAME = myBranch2.getText();
configuration.RESET_STICKY = mySwitchToHeadRevision.isSelected();
configuration.CREATE_NEW_DIRECTORIES = myCreateNewDirectories.isSelected();
final KeywordSubstitution keywordSubstitution = myChangeKeywordSubstitutionPanel.getKeywordSubstitution();
if (keywordSubstitution == null) {
configuration.UPDATE_KEYWORD_SUBSTITUTION = null;
} else {
configuration.UPDATE_KEYWORD_SUBSTITUTION = keywordSubstitution.toString();
}
myDateOrRevisionOrTagSettings.saveTo(configuration.UPDATE_DATE_OR_REVISION_SETTINGS);
}
Aggregations