1 11 package org.eclipse.team.internal.ccvs.ui; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.team.core.subscribers.Subscriber; 16 import org.eclipse.team.ui.mapping.*; 17 import org.eclipse.team.ui.synchronize.SubscriberTeamStateProvider; 18 19 public class CVSTeamStateProvider extends SubscriberTeamStateProvider { 20 21 public CVSTeamStateProvider(Subscriber subscriber) { 22 super(subscriber); 23 } 24 25 public ITeamStateDescription getStateDescription(Object element, final int requestedStateMask, String [] properties, IProgressMonitor monitor) throws CoreException { 26 if (properties != null && properties.length == 0) { 27 return new CVSTeamStateDescription(getSynchronizationState(element, requestedStateMask, monitor)); 28 } 29 CVSDecoration d = CVSLightweightDecorator.decorate(element, new SynchronizationStateTester() { 30 public int getState(Object element, int stateMask, IProgressMonitor monitor) throws CoreException { 31 if (requestedStateMask != USE_DECORATED_STATE_MASK) { 32 stateMask = requestedStateMask & stateMask; 33 } 34 return getSynchronizationState(element, requestedStateMask & stateMask, monitor); 35 } 36 }); 37 return d.asTeamStateDescription(properties); 38 } 39 } 40 | Popular Tags |