*/
private static Resource collectAllAndCopyIntoDestResource( Resource projectResource, String dest ) {
// this is the contents of our project (ie maps and pages and other)
// note these resources in the resource set (ie the raw form not objects)
//
ResourceSet resourceSet = projectResource.getResourceSet();
// start with the project resource
List<Resource> resources = gatherAllResourcesToList(projectResource);
// let us make the new file to write out
File destFile = new File(dest);
String absoluteDestPath = destFile.getAbsolutePath();
URI destURI = URI.createFileURI(absoluteDestPath);
Resource destResource = resourceSet.createResource(destURI);
Collection<EObject> collection = new ArrayList<EObject>();
for( Resource curResource : resources ) {
collection.addAll(curResource.getContents());
}