public IResource[] refreshStatus(final IResource resource,final boolean recursive) throws SVNException {
  if (SVNWorkspaceRoot.isLinkedResource(resource)) {
    return new IResource[0];
  }
  final int depth=(recursive) ? IResource.DEPTH_INFINITE : IResource.DEPTH_ONE;
  final StatusUpdateStrategy strategy=(depth == IResource.DEPTH_INFINITE) ? (StatusUpdateStrategy)new RecursiveStatusUpdateStrategy(statusCache) : (StatusUpdateStrategy)new NonRecursiveStatusUpdateStrategy(statusCache);
  try {
    List<IResource> refreshedResources=updateCache(resource,strategy.statusesToUpdate(resource));
    Set<IResource> resourcesToRefresh=resourcesToRefresh(resource,depth,IContainer.INCLUDE_PHANTOMS,refreshedResources.size());
    for (Iterator<IResource> iter=refreshedResources.iterator(); iter.hasNext(); ) {
      resourcesToRefresh.remove(iter.next());
    }
    for (    IResource res : resourcesToRefresh) {
      if ((res.getType() != IResource.FILE) && res.isPhantom()) {
        Set<IResource> children=resourcesToRefresh(res,IResource.DEPTH_INFINITE,IContainer.INCLUDE_PHANTOMS | IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS,0);
        for (        IResource child : children) {
          statusCache.removeStatus(child);
          refreshedResources.add(child);
        }
      }
      statusCache.removeStatus(res);
      refreshedResources.add(res);
    }
    return (IResource[])refreshedResources.toArray(new IResource[refreshedResources.size()]);
  }
 catch (  CoreException e) {
    throw SVNException.wrapException(e);
  }
}

public IResource [ ] refreshStatus ( final IResource resource , final boolean recursive ) throws SVNException { if ( SVNWorkspaceRoot . isLinkedResource ( resource ) ) { return new IResource [ 0 ] ; } final int depth = ( recursive ) ? IResource . DEPTH_INFINITE : IResource . DEPTH_ONE ; final StatusUpdateStrategy strategy = ( depth == IResource . DEPTH_INFINITE ) ? ( StatusUpdateStrategy ) new RecursiveStatusUpdateStrategy ( statusCache ) : ( StatusUpdateStrategy ) new NonRecursiveStatusUpdateStrategy ( statusCache ) ; try { List < IResource > refreshedResources = updateCache ( resource , strategy . statusesToUpdate ( resource ) ) ; Set < IResource > resourcesToRefresh = resourcesToRefresh ( resource , depth , IContainer . INCLUDE_PHANTOMS , refreshedResources . size ( ) ) ; for ( Iterator < IResource > iter = refreshedResources . iterator ( ) ; iter . hasNext ( ) ; ) { resourcesToRefresh . remove ( iter . next ( ) ) ; } for ( IResource res : resourcesToRefresh ) { if ( ( res . getType ( ) != IResource . FILE ) && res . isPhantom ( ) ) { Set < IResource > children = resourcesToRefresh ( res , IResource . DEPTH_INFINITE , IContainer . INCLUDE_PHANTOMS | IContainer . INCLUDE_TEAM_PRIVATE_MEMBERS , 0 ) ; for ( IResource child : children ) { statusCache . removeStatus ( child ) ; refreshedResources . add ( child ) ; } } statusCache . removeStatus ( res ) ; refreshedResources . add ( res ) ; } return ( IResource [ ] ) refreshedResources . toArray ( new IResource [ refreshedResources . size ( ) ] ) ; } catch ( CoreException e ) { throw SVNException . wrapException ( e ) ; } }
refresh the status of the given resource to the give depth . the depth can be deeper in case of phantom resources . these have to be traversed to infinite always . . .
