KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2007 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.window.Window;
14 import org.eclipse.team.internal.ccvs.core.CVSTag;
15 import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
16 import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
17 import org.eclipse.team.internal.ccvs.ui.operations.ReplaceOperation;
18 import org.eclipse.team.internal.ccvs.ui.tags.TagSelectionDialog;
19 import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
20
21 public class ReplaceWithSelectableTagAction extends ReplaceWithTagAction {
22     
23     /* (non-Javadoc)
24      * @see org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction.getTag(ReplaceOperation)
25      */

26     protected CVSTag getTag(final ReplaceOperation replaceOperation) {
27         TagSelectionDialog dialog = new TagSelectionDialog(getShell(), TagSource.create(replaceOperation.getScope().getMappings()),
28             CVSUIMessages.ReplaceWithTagAction_message,
29             CVSUIMessages.TagSelectionDialog_Select_a_Tag_1,
30             TagSelectionDialog.INCLUDE_ALL_TAGS,
31             false, /*show recurse*/
32             IHelpContextIds.REPLACE_TAG_SELECTION_DIALOG);
33         dialog.setBlockOnOpen(true);
34         if (dialog.open() == Window.CANCEL) {
35             return null;
36         }
37         return dialog.getResult();
38     }
39     
40 }
41
Popular Tags