IRosterEntry entry = page.getRosterEntry();
IUser remoteUser = entry.getUser();
ID ownId = entry.getRoster().getUser().getID();
IResource[] resources = page.getSelectedResources();
RemoteSubscriberParticipant participant = getSubscriberParticipant(share, ownId, remoteUser.getID());
participant.setResources(resources);
TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
if (resources.length == 1) {
participant.refresh(resources, NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationTaskName, remoteUser.getNickname()), NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationResourceDescription, resources[0].getName(), remoteUser.getNickname()), null);
} else {
participant.refresh(resources, NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationTaskName, remoteUser.getNickname()), NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationResourcesDescription, remoteUser.getNickname()), null);
}
return true;
}