for (IProjectElement element : elements) {
if( element instanceof Map){
Map map=(Map) element;
map.eSetDeliver(false);
map.sendCommandSync(new NullCommand());
map.eSetDeliver(true);
}
}
project.getElementsInternal().clear();
// Map commands could have put another command on the project stack so