KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > mappings > ModelParticipantChangeSetCapability


1 /*******************************************************************************
2  * Copyright (c) 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.mappings;
12
13 import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
14 import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
15 import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
16 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
17
18 public abstract class ModelParticipantChangeSetCapability extends ChangeSetCapability {
19
20     /* (non-Javadoc)
21      * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#enableChangeSetsByDefault()
22      */

23     public boolean enableChangeSetsByDefault() {
24         return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_COMMIT_SET_DEFAULT_ENABLEMENT);
25     }
26
27     /* (non-Javadoc)
28      * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#supportsCheckedInChangeSets()
29      */

30     public boolean supportsCheckedInChangeSets() {
31         return true;
32     }
33
34     /* (non-Javadoc)
35      * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#enableCheckedInChangeSetsFor(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
36      */

37     public boolean enableCheckedInChangeSetsFor(ISynchronizePageConfiguration configuration) {
38         return supportsCheckedInChangeSets() &&
39             configuration.getMode() != ISynchronizePageConfiguration.OUTGOING_MODE;
40     }
41
42     public abstract CheckedInChangeSetCollector createCheckedInChangeSetCollector(ISynchronizePageConfiguration configuration);
43
44 }
45
Popular Tags