use of org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizardUpdatePage in project subclipse by subclipse.
the class UpdateDialogAction method execute.
public void execute(IAction action) throws InterruptedException, InvocationTargetException {
if (action != null && !action.isEnabled()) {
action.setEnabled(true);
} else {
IResource[] resources = getSelectedResources();
String pageName;
if (resources.length > 1)
// $NON-NLS-1$
pageName = "UpdateDialogWithConflictHandling.multiple";
else
// $NON-NLS-1$
pageName = "UpdateDialogWithConflictHandling";
SvnWizardUpdatePage updatePage = new SvnWizardUpdatePage(pageName, resources);
updatePage.setDefaultRevision(revision);
updatePage.setDepth(depth);
updatePage.setSetDepth(setDepth);
SvnWizard wizard = new SvnWizard(updatePage);
SvnWizardDialog dialog = new SvnWizardDialog(getShell(), wizard);
wizard.setParentDialog(dialog);
if (dialog.open() == SvnWizardDialog.OK) {
SVNRevision svnRevision = updatePage.getRevision();
UpdateOperation updateOperation = new UpdateOperation(getTargetPart(), resources, svnRevision);
updateOperation.setDepth(updatePage.getDepth());
updateOperation.setSetDepth(updatePage.isSetDepth());
updateOperation.setForce(updatePage.isForce());
updateOperation.setIgnoreExternals(updatePage.isIgnoreExternals());
updateOperation.setCanRunAsJob(canRunAsJob);
updateOperation.setConflictResolver(updatePage.getConflictResolver());
updateOperation.run();
}
}
}
Aggregations