Search in sources :

Example 1 with CancelledConfigurationException

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);
}
Also used : CvsConfiguration(com.intellij.cvsSupport2.config.CvsConfiguration) CancelledConfigurationException(com.intellij.openapi.options.CancelledConfigurationException) KeywordSubstitution(org.netbeans.lib.cvsclient.command.KeywordSubstitution)

Aggregations

CvsConfiguration (com.intellij.cvsSupport2.config.CvsConfiguration)1 CancelledConfigurationException (com.intellij.openapi.options.CancelledConfigurationException)1 KeywordSubstitution (org.netbeans.lib.cvsclient.command.KeywordSubstitution)1