use of com.intellij.cvsSupport2.ui.experts.checkout.CheckoutWizard in project intellij-community by JetBrains.
the class CheckoutAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
final Project project = context.getProject();
CheckoutWizard checkoutWizard = new CheckoutWizard(project);
if (!checkoutWizard.showAndGet()) {
return CvsHandler.NULL;
}
myUseAlternativeCheckoutPath = checkoutWizard.useAlternativeCheckoutLocation();
myCheckoutDirectory = checkoutWizard.getCheckoutDirectory();
mySelectedElements = checkoutWizard.getSelectedElements();
return CommandCvsHandler.createCheckoutHandler(checkoutWizard.getSelectedConfiguration(), collectCheckoutPaths(), myCheckoutDirectory, myUseAlternativeCheckoutPath, CvsApplicationLevelConfiguration.getInstance().MAKE_CHECKED_OUT_FILES_READONLY, project == null ? null : VcsConfiguration.getInstance(project).getCheckoutOption());
}
use of com.intellij.cvsSupport2.ui.experts.checkout.CheckoutWizard 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