use of org.eclipse.team.internal.ecf.ui.subscriber.RemoteSubscriberParticipant in project ecf by eclipse.
the class SynchronizeWithHandler method scheduleRefreshJob.
void scheduleRefreshJob(RemoteShare share, ID localId, ID remoteId, IResource[] resources, IUser remoteUser, IWorkbenchPartSite site) {
RemoteSubscriberParticipant participant = RemotePeerSynchronizeWizard.getSubscriberParticipant(share, localId, remoteId);
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()), site);
} else {
participant.refresh(resources, NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationTaskName, remoteUser.getNickname()), NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationResourcesDescription, remoteUser.getNickname()), site);
}
}
use of org.eclipse.team.internal.ecf.ui.subscriber.RemoteSubscriberParticipant in project ecf by eclipse.
the class RemotePeerSynchronizeWizard method performFinish.
public boolean performFinish() {
ID containerId = page.getContainerId();
RemoteShare share = TeamSynchronization.getShare(containerId);
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;
}
Aggregations