public static boolean isTeamProjectUpToDate(IProject project, IProgressMonitor monitor) throws CoreException {
return getTeamOutOfSyncResources(project, monitor).length == 0;
}
public static IResource[] getTeamOutOfSyncResources(IProject project, IProgressMonitor monitor) throws CoreException {
RepositoryProvider provider = RepositoryProvider.getProvider(project);
if (provider == null) {
return new IResource[0];
}
Subscriber subscriber = provider.getSubscriber();
subscriber.refresh(new IResource[] {project}, IResource.DEPTH_INFINITE, monitor);
SyncInfoSet sis = new SyncInfoSet();
subscriber.collectOutOfSync(new IResource[] {project}, IResource.DEPTH_INFINITE, sis, monitor);
List<IResource> res = new ArrayList<IResource>();