RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), SVNProviderPlugin.PROVIDER_ID); if (provider != null) { return ((SVNTeamProvider)provider).getResourceVariant(resource); } return null;
System.out.println("Populating remote tree:"+resource); IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceRoot workspaceRoot = workspace.getRoot();  ISVNClientAdapter client = SVNProviderPlugin.getPlugin().createSVNClient(); ISVNLocalResource rootResource = SVNWorkspaceRoot.getSVNResourceFor( resource ); RemoteFolderTree rootVariant = new RemoteFolderTree(null, rootResource.getRepository(), rootResource.getUrl(), null, rootResource.getStatus().getLastChangedRevision(), null, null);  Map folders = new HashMap(); folders.put(resource, new ArrayList()); Map resourceVariantMap = new HashMap(); resourceVariantMap.put( resource, rootVariant); try { ISVNDirEntry[] entries = client.getList(resource.getLocation().toFile(),SVNRevision.HEAD,true); for (int i = 0; i < entries.length; i++) { ISVNDirEntry entry = entries[i]; IPath entryPath = resource.getLocation().append( entry.getPath() ); System.out.println(entryPath);  IResource memberResource = null; IResourceVariant memberVariant = null; if ( entry.getNodeKind() == SVNNodeKind.DIR ) { memberResource = workspaceRoot.getContainerForLocation(entryPath); ISVNLocalResource localResource = SVNWorkspaceRoot.getSVNResourceFor( memberResource ); memberVariant = new RemoteFolderTree(null, localResource.getRepository(), localResource.getUrl(), null, entry.getLastChangedRevision(), entry.getLastChangedDate(), entry.getLastCommitAuthor()); folders.put(memberResource, new ArrayList()); resourceVariantMap.put(memberResource, memberVariant); } else if ( entry.getNodeKind() == SVNNodeKind.FILE ) { memberResource = workspaceRoot.getFileForLocation(entryPath); ISVNLocalResource localResource = SVNWorkspaceRoot.getSVNResourceFor( memberResource ); memberVariant = new RemoteFile(null, localResource.getRepository(), localResource.getUrl(), null, entry.getLastChangedRevision(), entry.getLastChangedDate(), entry.getLastCommitAuthor()); }  List children = (List) folders.get( memberResource.getParent() ); if( children == null ) { children = new ArrayList(); folders.put(memberResource.getParent(), children); } children.add( memberVariant ); }  for (Iterator i = folders.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); IResource r = (IResource) entry.getKey(); List children = (List) entry.getValue(); ISVNRemoteResource[] children2 = (ISVNRemoteResource[]) children.toArray(new ISVNRemoteResource[ children.size()]); RemoteFolderTree tree = (RemoteFolderTree) resourceVariantMap.get(r); tree.setChildren( children2 ); } } catch (SVNClientException e) {  e.printStackTrace(); } return rootVariant;
	protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {		RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), SVNProviderPlugin.PROVIDER_ID);		if (provider != null) {			return ((SVNTeamProvider)provider).getResourceVariant(resource);		}		return null;	}