KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > wizards > RestoreFromRepositoryWizard


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

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 /**
22  * This wizard allows the user to show deleted resources in the history view
23  */

24 public class RestoreFromRepositoryWizard extends Wizard {
25
26     private RestoreFromRepositoryFileSelectionPage fileSelectionPage;
27     private IContainer parent;
28     private ICVSFile[] files;
29     
30     /**
31      * Constructor for RestoreFromRepositoryWizard.
32      */

33     public RestoreFromRepositoryWizard(IContainer parent, ICVSFile[] files) {
34         this.parent = parent;
35         this.files = files;
36         setWindowTitle(CVSUIMessages.RestoreFromRepositoryWizard_fileSelectionPageTitle);
37     }
38
39     /**
40      * @see org.eclipse.jface.wizard.IWizard#performFinish()
41      */

42     public boolean performFinish() {
43         return fileSelectionPage.restoreSelectedFiles();
44     }
45     
46     /**
47      * @see org.eclipse.jface.wizard.IWizard#addPages()
48      */

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); //$NON-NLS-1$
54
fileSelectionPage.setInput(parent, files);
55         addPage(fileSelectionPage);
56     }
57 }
58
Popular Tags