use of org.eclipse.team.core.variants.IResourceVariant in project ecf by eclipse.
the class RemoteShare method fetchMembers.
public synchronized IResourceVariant[] fetchMembers(ID ownId, ID remoteId, IResourceVariant variant, IProgressMonitor monitor) throws TeamException {
RemoteResourceVariant remoteVariant = (RemoteResourceVariant) variant;
if (!remoteVariant.hasMembers()) {
// members, just return an empty array
return new IResourceVariant[0];
}
monitor.subTask(NLS.bind(Messages.RemoteShare_FetchingVariant, variant.getName()));
sendMessage(remoteId, new FetchVariantsRequest(ownId, remoteVariant.getPath(), remoteVariant.getType()));
while (returnValue == null) {
try {
Thread.sleep(100);
if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
} catch (InterruptedException e) {
// TODO: do we want to handle this differently...?
Thread.interrupted();
// $NON-NLS-1$
throw new TeamException("Interrupted whilst fetching members");
}
}
monitor.done();
Object tmpValue = returnValue;
returnValue = null;
return (IResourceVariant[]) tmpValue;
}
Aggregations