use of com.intellij.cvsSupport2.config.CvsConfiguration 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);
}
use of com.intellij.cvsSupport2.config.CvsConfiguration in project intellij-community by JetBrains.
the class CvsUpdateEnvironment method updateDirectories.
@NotNull
public UpdateSession updateDirectories(@NotNull FilePath[] contentRoots, final UpdatedFiles updatedFiles, ProgressIndicator progressIndicator, @NotNull final Ref<SequentialUpdatesContext> contextRef) {
CvsConfiguration cvsConfiguration = CvsConfiguration.getInstance(myProject);
if (!myLastUpdateWasConfigured) {
cvsConfiguration.CLEAN_COPY = false;
cvsConfiguration.RESET_STICKY = false;
}
myLastUpdateWasConfigured = false;
try {
final UpdateSettingsOnCvsConfiguration updateSettings = createSettingsAndUpdateContext(cvsConfiguration, contextRef);
final UpdateHandler handler = CommandCvsHandler.createUpdateHandler(contentRoots, updateSettings, myProject, updatedFiles);
handler.addCvsListener(new UpdatedFilesProcessor(updatedFiles));
CvsOperationExecutor cvsOperationExecutor = new CvsOperationExecutor(true, myProject, ModalityState.defaultModalityState());
cvsOperationExecutor.setShowErrors(false);
cvsOperationExecutor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
final CvsResult result = cvsOperationExecutor.getResult();
return createUpdateSessionAdapter(updatedFiles, result);
} finally {
cvsConfiguration.CLEAN_COPY = false;
cvsConfiguration.RESET_STICKY = false;
}
}
use of com.intellij.cvsSupport2.config.CvsConfiguration in project intellij-community by JetBrains.
the class AbstractWatchAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
CvsConfiguration configuration = CvsConfiguration.getInstance(context.getProject());
WatcherDialog dialog = createDialog(configuration, context);
if (!dialog.showAndGet()) {
return CvsHandler.NULL;
}
Watch watch = dialog.getWatch();
saveWatch(configuration, watch);
WatchOperation watchOperation = new WatchOperation(getWatchOperation(), watch);
VirtualFile[] files = context.getSelectedFiles();
for (int i = 0; i < files.length; i++) {
watchOperation.addFile(files[i]);
}
return new CommandCvsHandler(getTitle(context), watchOperation);
}
use of com.intellij.cvsSupport2.config.CvsConfiguration in project intellij-community by JetBrains.
the class CvsConfigurationPanel method updateFrom.
public void updateFrom(CvsConfiguration config, CvsApplicationLevelConfiguration appLevelConfiguration) {
myConfigurations = new ArrayList<>(appLevelConfiguration.CONFIGURATIONS);
myShowOutput.setSelected(config.SHOW_OUTPUT);
myMakeNewFilesReadOnly.setSelected(config.MAKE_NEW_FILES_READONLY);
myOnFileMergedWithConflictGroup[config.SHOW_CORRUPTED_PROJECT_FILES].setSelected(true);
myDefaultTextFileKeywordSubstitution.removeAllItems();
for (final KeywordSubstitutionWrapper keywordSubstitution : KeywordSubstitutionWrapper.values()) {
myDefaultTextFileKeywordSubstitution.addItem(keywordSubstitution);
}
myDefaultTextFileKeywordSubstitution.setSelectedItem(KeywordSubstitutionWrapper.getValue(config.DEFAULT_TEXT_FILE_SUBSTITUTION));
}
Aggregations