use of com.intellij.openapi.vcs.ui.ReplaceFileConfirmationDialog in project intellij-community by JetBrains.
the class GetVersionAction method doGet.
public static void doGet(@NotNull Project project, @NotNull VcsFileRevision revision, @NotNull FilePath filePath) {
VirtualFile virtualFile = filePath.getVirtualFile();
if (virtualFile != null) {
ReplaceFileConfirmationDialog confirmationDialog = new ReplaceFileConfirmationDialog(project, VcsBundle.message("acton.name.get.revision"));
if (!confirmationDialog.confirmFor(new VirtualFile[] { virtualFile })) {
return;
}
}
new MyWriteVersionTask(project, filePath, revision).queue();
refreshFile(filePath, revision, project);
}
use of com.intellij.openapi.vcs.ui.ReplaceFileConfirmationDialog 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());
}
Aggregations