KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > subscriber > CVSChangeSetActionGroup


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.subscriber;
12
13 import org.eclipse.jface.action.IMenuManager;
14 import org.eclipse.team.internal.ui.synchronize.IChangeSetProvider;
15 import org.eclipse.team.ui.synchronize.*;
16
17 /**
18  * Action group that is used by CVS Change Set Capabilities
19  */

20 public class CVSChangeSetActionGroup extends SynchronizePageActionGroup {
21
22     private OpenChangeSetAction openCommitSet;
23     
24     public void initialize(ISynchronizePageConfiguration configuration) {
25         super.initialize(configuration);
26         openCommitSet = new OpenChangeSetAction(configuration);
27     }
28     
29     /* (non-Javadoc)
30      * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
31      */

32     public void fillContextMenu(IMenuManager menu) {
33         ISynchronizeParticipant participant = getConfiguration().getParticipant();
34         if (participant instanceof IChangeSetProvider) {
35             if (((IChangeSetProvider)participant).getChangeSetCapability().enableCheckedInChangeSetsFor(getConfiguration())) {
36                 appendToGroup(
37                         menu,
38                         ISynchronizePageConfiguration.FILE_GROUP,
39                         openCommitSet);
40             }
41         }
42     }
43 }
44
Popular Tags