Search in sources :

Example 16 with CvsOperationExecutor

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);
}
Also used : CommandCvsHandler(com.intellij.cvsSupport2.cvshandlers.CommandCvsHandler) CvsHandler(com.intellij.cvsSupport2.cvshandlers.CvsHandler) CvsOperationExecutor(com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor) EditOptionsDialog(com.intellij.cvsSupport2.cvsoperations.cvsEdit.ui.EditOptionsDialog)

Example 17 with CvsOperationExecutor

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();
}
Also used : FilePath(com.intellij.openapi.vcs.FilePath) CommandCvsHandler(com.intellij.cvsSupport2.cvshandlers.CommandCvsHandler) CvsHandler(com.intellij.cvsSupport2.cvshandlers.CvsHandler) CvsOperationExecutor(com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor)

Example 18 with CvsOperationExecutor

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();
}
Also used : CommandCvsHandler(com.intellij.cvsSupport2.cvshandlers.CommandCvsHandler) CvsHandler(com.intellij.cvsSupport2.cvshandlers.CvsHandler) CvsOperationExecutor(com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor)

Example 19 with CvsOperationExecutor

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);
}
Also used : FilePath(com.intellij.openapi.vcs.FilePath) CvsHandler(com.intellij.cvsSupport2.cvshandlers.CvsHandler) CommandCvsHandler(com.intellij.cvsSupport2.cvshandlers.CommandCvsHandler) CvsOperationExecutor(com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor)

Example 20 with CvsOperationExecutor

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) {
        }
    });
}
Also used : CvsHandler(com.intellij.cvsSupport2.cvshandlers.CvsHandler) CommandCvsHandler(com.intellij.cvsSupport2.cvshandlers.CommandCvsHandler) CvsOperationExecutor(com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor) CvsElement(com.intellij.cvsSupport2.cvsBrowser.CvsElement) ModalityContext(com.intellij.cvsSupport2.cvsExecution.ModalityContext) File(java.io.File) CvsOperationExecutorCallback(com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutorCallback) CheckoutWizard(com.intellij.cvsSupport2.ui.experts.checkout.CheckoutWizard)

Aggregations

CvsOperationExecutor (com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor)21 CommandCvsHandler (com.intellij.cvsSupport2.cvshandlers.CommandCvsHandler)17 CvsHandler (com.intellij.cvsSupport2.cvshandlers.CvsHandler)7 CvsResult (com.intellij.openapi.cvsIntegration.CvsResult)7 File (java.io.File)4 FilePath (com.intellij.openapi.vcs.FilePath)3 CvsConfiguration (com.intellij.cvsSupport2.config.CvsConfiguration)2 DefaultCvsOperationExecutorCallback (com.intellij.cvsSupport2.cvsExecution.DefaultCvsOperationExecutorCallback)2 UpdateHandler (com.intellij.cvsSupport2.cvshandlers.UpdateHandler)2 GetFileContentOperation (com.intellij.cvsSupport2.cvsoperations.cvsContent.GetFileContentOperation)2 UpdatedFilesProcessor (com.intellij.cvsSupport2.updateinfo.UpdatedFilesProcessor)2 ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)2 VcsException (com.intellij.openapi.vcs.VcsException)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 List (java.util.List)2 NotNull (org.jetbrains.annotations.NotNull)2 CvsMergeProvider (com.intellij.cvsSupport2.actions.merge.CvsMergeProvider)1 UpdateSettings (com.intellij.cvsSupport2.actions.update.UpdateSettings)1 UpdateSettingsOnCvsConfiguration (com.intellij.cvsSupport2.actions.update.UpdateSettingsOnCvsConfiguration)1 CvsChangeList (com.intellij.cvsSupport2.changeBrowser.CvsChangeList)1