Search in sources :

Example 1 with RemoteSubscriberParticipant

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);
    }
}
Also used : RemoteSubscriberParticipant(org.eclipse.team.internal.ecf.ui.subscriber.RemoteSubscriberParticipant)

Example 2 with RemoteSubscriberParticipant

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;
}
Also used : RemoteShare(org.eclipse.team.internal.ecf.core.RemoteShare) IUser(org.eclipse.ecf.core.user.IUser) RemoteSubscriberParticipant(org.eclipse.team.internal.ecf.ui.subscriber.RemoteSubscriberParticipant) ID(org.eclipse.ecf.core.identity.ID) IRosterEntry(org.eclipse.ecf.presence.roster.IRosterEntry) IResource(org.eclipse.core.resources.IResource)

Aggregations

RemoteSubscriberParticipant (org.eclipse.team.internal.ecf.ui.subscriber.RemoteSubscriberParticipant)2 IResource (org.eclipse.core.resources.IResource)1 ID (org.eclipse.ecf.core.identity.ID)1 IUser (org.eclipse.ecf.core.user.IUser)1 IRosterEntry (org.eclipse.ecf.presence.roster.IRosterEntry)1 RemoteShare (org.eclipse.team.internal.ecf.core.RemoteShare)1