subMonitor.setWorkRemaining(100);
useVersionControl = sarosSession.useVersionControl();
pInfos = new ArrayList<ProjectExchangeInfo>(this.projects.size());
for (IProject iProject : this.projects) {
if (subMonitor.isCanceled())
throw new LocalCancellationException(null,
CancelOption.NOTIFY_PEER);
try {
String projectID = sarosSession.getProjectID(iProject);
String projectName = iProject.getName();
FileList projectFileList = FileListFactory.createFileList(
iProject, this.selectedProjectResources.get(iProject),
useVersionControl, subMonitor.newChild(0));
projectFileList.setProjectID(projectID);
boolean partial = !sarosSession
.isCompletelyShared(iProject);
ProjectExchangeInfo pInfo = new ProjectExchangeInfo(
projectID, "", projectName, partial, projectFileList);
pInfos.add(pInfo);
} catch (CoreException e) {
throw new LocalCancellationException(e.getMessage(),
CancelOption.NOTIFY_PEER);
}
subMonitor.worked(100 / projects.size());
}
}
if (subMonitor.isCanceled())
throw new LocalCancellationException(null, CancelOption.NOTIFY_PEER);
subMonitor.subTask("");
log.debug("Inv" + Utils.prefix(peer) + ": Sending file list...");
subMonitor.setTaskName("Sending file list...");
this.sarosSession.sendActivity(sarosSession.getUser(peer),
new ProjectsAddedActivity(sarosSession.getLocalUser(), pInfos,