use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsVcs2 method editFiles.
public void editFiles(final VirtualFile[] files) {
if (getEditOptions().getValue()) {
EditOptionsDialog editOptionsDialog = new EditOptionsDialog(myProject);
if (!editOptionsDialog.showAndGet()) {
return;
}
}
final CvsHandler editHandler = CommandCvsHandler.createEditHandler(files, CvsConfiguration.getInstance(myProject).RESERVED_EDIT);
new CvsOperationExecutor(true, myProject, ModalityState.current()).performActionSync(editHandler, CvsOperationExecutorCallback.EMPTY);
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsCheckinEnvironment method scheduleMissingFileForDeletion.
public List<VcsException> scheduleMissingFileForDeletion(List<FilePath> files) {
for (FilePath file : files) {
if (file.isDirectory()) {
VcsBalloonProblemNotifier.showOverChangesView(myProject, "Locally deleted directories cannot be removed from CVS. To remove a locally " + "deleted directory from CVS, first invoke Rollback and then use " + ApplicationNamesInfo.getInstance().getFullProductName() + "'s Delete.", MessageType.WARNING);
break;
}
}
final CvsHandler handler = RemoveLocallyFileOrDirectoryAction.getDefaultHandler(myProject, ChangesUtil.filePathsToFiles(files));
final CvsOperationExecutor executor = new CvsOperationExecutor(myProject);
executor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
return Collections.emptyList();
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsCheckinEnvironment method scheduleUnversionedFilesForAddition.
public List<VcsException> scheduleUnversionedFilesForAddition(List<VirtualFile> files) {
final CvsHandler handler = AddFileOrDirectoryAction.getDefaultHandler(myProject, VfsUtil.toVirtualFileArray(files));
final CvsOperationExecutor executor = new CvsOperationExecutor(myProject);
executor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
return Collections.emptyList();
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsRollbackEnvironment method rollbackMissingFileDeletion.
public void rollbackMissingFileDeletion(List<FilePath> filePaths, final List<VcsException> exceptions, final RollbackProgressListener listener) {
final CvsHandler cvsHandler = CommandCvsHandler.createCheckoutFileHandler(filePaths.toArray(new FilePath[filePaths.size()]), CvsConfiguration.getInstance(myProject), null);
final CvsOperationExecutor executor = new CvsOperationExecutor(myProject);
executor.performActionSync(cvsHandler, CvsOperationExecutorCallback.EMPTY);
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsCheckoutProvider method doCheckout.
public void doCheckout(@NotNull final Project project, final CheckoutProvider.Listener listener) {
final CheckoutWizard checkoutWizard = new CheckoutWizard(project);
if (!checkoutWizard.showAndGet()) {
return;
}
final boolean useAlternateCheckoutPath = checkoutWizard.useAlternativeCheckoutLocation();
final File checkoutDirectory = checkoutWizard.getCheckoutDirectory();
final CvsElement[] selectedElements = checkoutWizard.getSelectedElements();
final CvsHandler checkoutHandler = CommandCvsHandler.createCheckoutHandler(checkoutWizard.getConfigurationWithDateOrRevisionSettings(), collectCheckoutPaths(selectedElements), checkoutDirectory, useAlternateCheckoutPath, CvsApplicationLevelConfiguration.getInstance().MAKE_CHECKED_OUT_FILES_READONLY, VcsConfiguration.getInstance(project).getCheckoutOption());
final CvsOperationExecutor executor = new CvsOperationExecutor(null);
executor.performActionSync(checkoutHandler, new CvsOperationExecutorCallback() {
public void executionFinished(boolean successfully) {
if (!executor.hasNoErrors()) {
Messages.showErrorDialog(CvsBundle.message("message.error.checkout", executor.getResult().composeError().getLocalizedMessage()), CvsBundle.message("operation.name.check.out.project"));
}
refreshAfterCheckout(listener, selectedElements, checkoutDirectory, useAlternateCheckoutPath);
}
public void executionFinishedSuccessfully() {
}
public void executeInProgressAfterAction(ModalityContext modaityContext) {
}
});
}
Aggregations