1 11 package org.eclipse.team.ui.mapping; 12 13 import org.eclipse.core.resources.IResourceChangeListener; 14 import org.eclipse.core.resources.IWorkspace; 15 import org.eclipse.core.resources.mapping.ResourceMapping; 16 import org.eclipse.core.runtime.CoreException; 17 import org.eclipse.core.runtime.IProgressMonitor; 18 import org.eclipse.jface.viewers.IDecorationContext; 19 import org.eclipse.team.core.diff.IDiff; 20 import org.eclipse.team.core.subscribers.Subscriber; 21 import org.eclipse.team.internal.ui.TeamUIPlugin; 22 import org.eclipse.ui.IDecoratorManager; 23 24 62 public class SynchronizationStateTester { 63 64 72 public static final String PROP_TESTER = "org.eclipse.team.ui.syncStateTester"; 74 77 public SynchronizationStateTester() { 78 super(); 79 } 80 81 94 public boolean isStateDecorationEnabled() { 95 return true; 96 } 97 98 114 public boolean isDecorationEnabled(Object element) { 115 return isStateDecorationEnabled(); 116 } 117 118 153 public int getState(Object element, int stateMask, IProgressMonitor monitor) throws CoreException { 154 ITeamStateDescription desc = getTeamStateProvider().getStateDescription(element, stateMask, new String [0], monitor); 155 if (desc != null) 156 return desc.getStateFlags(); 157 return IDiff.NO_CHANGE; 158 } 159 160 166 public final ITeamStateProvider getTeamStateProvider() { 167 return TeamUIPlugin.getPlugin().getDecoratedStateProvider(); 168 } 169 170 179 public void elementDecorated(Object element, ITeamStateDescription description) { 180 } 182 183 184 } 185 | Popular Tags |