Search in sources :

Example 1 with CheckoutFileDialog

use of com.intellij.cvsSupport2.cvsoperations.cvsCheckOut.ui.CheckoutFileDialog in project intellij-community by JetBrains.

the class CheckoutFileAction method getCvsHandler.

protected CvsHandler getCvsHandler(CvsContext context) {
    if (myModifiedFiles != null) {
        if (!myModifiedFiles.isEmpty()) {
            if (!new ReplaceFileConfirmationDialog(context.getProject(), CvsBundle.getCheckoutOperationName()).requestConfirmation(myModifiedFiles)) {
                return CvsHandler.NULL;
            }
        }
    }
    myModifiedFiles = null;
    Project project = context.getProject();
    FilePath[] filesArray = context.getSelectedFilePaths();
    List<FilePath> files = Arrays.asList(filesArray);
    if (CvsVcs2.getInstance(project).getCheckoutOptions().getValue() || OptionsDialog.shiftIsPressed(context.getModifiers())) {
        CheckoutFileDialog checkoutFileDialog = new CheckoutFileDialog(project, files);
        if (!checkoutFileDialog.showAndGet()) {
            return CvsHandler.NULL;
        }
    }
    return CommandCvsHandler.createCheckoutFileHandler(filesArray, CvsConfiguration.getInstance(project), VcsConfiguration.getInstance(project).getCheckoutOption());
}
Also used : ReplaceFileConfirmationDialog(com.intellij.openapi.vcs.ui.ReplaceFileConfirmationDialog) FilePath(com.intellij.openapi.vcs.FilePath) Project(com.intellij.openapi.project.Project) CheckoutFileDialog(com.intellij.cvsSupport2.cvsoperations.cvsCheckOut.ui.CheckoutFileDialog)

Aggregations

CheckoutFileDialog (com.intellij.cvsSupport2.cvsoperations.cvsCheckOut.ui.CheckoutFileDialog)1 Project (com.intellij.openapi.project.Project)1 FilePath (com.intellij.openapi.vcs.FilePath)1 ReplaceFileConfirmationDialog (com.intellij.openapi.vcs.ui.ReplaceFileConfirmationDialog)1