1 11 package org.eclipse.team.internal.ccvs.ui.wizards; 12 13 import org.eclipse.core.resources.IContainer; 14 import org.eclipse.jface.resource.ImageDescriptor; 15 import org.eclipse.jface.wizard.Wizard; 16 import org.eclipse.team.internal.ccvs.core.ICVSFile; 17 import org.eclipse.team.internal.ccvs.ui.*; 18 import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; 19 import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants; 20 21 24 public class RestoreFromRepositoryWizard extends Wizard { 25 26 private RestoreFromRepositoryFileSelectionPage fileSelectionPage; 27 private IContainer parent; 28 private ICVSFile[] files; 29 30 33 public RestoreFromRepositoryWizard(IContainer parent, ICVSFile[] files) { 34 this.parent = parent; 35 this.files = files; 36 setWindowTitle(CVSUIMessages.RestoreFromRepositoryWizard_fileSelectionPageTitle); 37 } 38 39 42 public boolean performFinish() { 43 return fileSelectionPage.restoreSelectedFiles(); 44 } 45 46 49 public void addPages() { 50 setNeedsProgressMonitor(true); 51 ImageDescriptor substImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_CHECKOUT); 52 53 fileSelectionPage = new RestoreFromRepositoryFileSelectionPage("FileSelectionPage", CVSUIMessages.RestoreFromRepositoryWizard_fileSelectionPageTitle, substImage, CVSUIMessages.RestoreFromRepositoryWizard_fileSelectionPageDescription); fileSelectionPage.setInput(parent, files); 55 addPage(fileSelectionPage); 56 } 57 } 58 | Popular Tags |