private void createSessionFile(IProgressMonitor monitor) throws CoreException {
IInstrumentation[] instrs = session.getInstrumentations();
IPath[] coveragefiles = session.getCoverageDataFiles();
monitor.beginTask(NLS.bind(CoreMessages.ExportingSession_task, session.getDescription()),
instrs.length + coveragefiles.length + 1);
IMergeable metadata = null;
for (int i = 0; i < instrs.length; i++) {
metadata = loadDataFile(metadata, DataFactory.TYPE_METADATA, instrs[i].getMetaDataFile());
monitor.worked(1);
}
IMergeable coveragedata = null;
for (int i = 0; i < coveragefiles.length; i++) {
coveragedata = loadDataFile(coveragedata, DataFactory.TYPE_COVERAGEDATA, coveragefiles[i]);
monitor.worked(1);
}
ISessionData sessiondata = new SessionData((IMetaData) metadata, (ICoverageData) coveragedata);