KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.eclipse.jface.action.IAction;
14 import org.eclipse.jface.wizard.WizardDialog;
15 import org.eclipse.swt.widgets.Shell;
16 import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
17 import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
18 import org.eclipse.team.internal.ccvs.ui.wizards.MergeWizard;
19
20 public class MergeAction extends WorkspaceTraversalAction {
21
22     /*
23      * @see CVSAction#execute()
24      */

25     public void execute(IAction action) {
26         final Shell shell = getShell();
27         shell.getDisplay().syncExec(new Runnable JavaDoc() {
28             public void run() {
29                 MergeWizard wizard = new MergeWizard(getTargetPart(), getSelectedResources(), getSelectedResourceMappings(CVSProviderPlugin.getTypeId()));
30                 WizardDialog dialog = new WizardDialog(shell, wizard);
31                 dialog.open();
32             }
33         });
34     }
35     
36     /* (non-Javadoc)
37      * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
38      */

39     public String JavaDoc getId() {
40         return ICVSUIConstants.CMD_MERGE;
41     }
42 }
43
Popular Tags