if (model != null)
model.updateMarkers(document);
} else {
try {
monitor.beginTask("Saving ", 2000);
ContainerCreator creator = new ContainerCreator(
file.getWorkspace(), file.getParent().getFullPath());
creator.createContainer(new SubProgressMonitor(monitor, 1000));
file.create(stream, false, new SubProgressMonitor(monitor, 1000));
} finally {
monitor.done();
}
}