KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > actions > CheckoutWizardAction


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.actions;
12
13 import java.lang.reflect.InvocationTargetException JavaDoc;
14
15 import org.eclipse.jface.action.IAction;
16 import org.eclipse.jface.viewers.ISelection;
17 import org.eclipse.jface.wizard.WizardDialog;
18 import org.eclipse.swt.widgets.Shell;
19 import org.eclipse.team.internal.ccvs.ui.wizards.CheckoutWizard;
20 import org.eclipse.ui.IWorkbenchWindow;
21 import org.eclipse.ui.IWorkbenchWindowActionDelegate;
22
23 /**
24  * Action that launches the checkout wizard
25  */

26 public class CheckoutWizardAction extends CVSAction implements IWorkbenchWindowActionDelegate {
27     
28     Shell shell;
29     
30     /* (non-Javadoc)
31      * @see org.eclipse.ui.IActionDelegate2#dispose()
32      */

33     public void dispose() {
34     }
35
36     /* (non-Javadoc)
37      * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
38      */

39     public void init(IWorkbenchWindow window) {
40         this.shell = window.getShell();
41     }
42     
43     /* (non-Javadoc)
44      * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
45      */

46     protected void execute(IAction action) throws InvocationTargetException JavaDoc, InterruptedException JavaDoc {
47         CheckoutWizard wizard = new CheckoutWizard();
48         WizardDialog dialog = new WizardDialog(shell, wizard);
49         dialog.open();
50     }
51
52     /* (non-Javadoc)
53      * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
54      */

55     public void selectionChanged(IAction action, ISelection selection) {
56     }
57     
58     /* (non-Javadoc)
59      * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
60      */

61     public boolean isEnabled() {
62         return true;
63     }
64 }
65
Popular Tags