}
this.sessionID.setValue(String.valueOf(sessionRandom
.nextInt(Integer.MAX_VALUE)));
SarosSession sarosSession = new SarosSession(this.transmitter,
dispatchThreadContext, new DateTime(), sarosContext);
this.sarosSessionObservable.setValue(sarosSession);
notifySarosSessionStarting(sarosSession);
sarosSession.start();
notifySarosSessionStarted(sarosSession);
for (Entry<IProject, List<IResource>> mapEntry : projectResourcesMapping
.entrySet()) {
IProject iProject = mapEntry.getKey();
List<IResource> resourcesList = mapEntry.getValue();
if (!iProject.isOpen()) {
try {
iProject.open(null);
} catch (CoreException e1) {
log.debug("An error occur while opening project", e1); //$NON-NLS-1$
continue;
}
}
String projectID = String.valueOf(sessionRandom
.nextInt(Integer.MAX_VALUE));
sarosSession.addSharedResources(iProject, projectID, resourcesList);
notifyProjectAdded(iProject);
}
SarosSessionManager.log.info("Session started"); //$NON-NLS-1$
}