final Resource newResource = diagramDocument.getEditingDomain()
.getResourceSet().createResource(newResoruceURI);
final Diagram diagramCopy = (Diagram) EcoreUtil
.copy(diagramDocument.getDiagram());
try {
new AbstractTransactionalCommand(diagramDocument
.getEditingDomain(), NLS.bind(
Messages.Fd2DocumentProvider_SaveAsOperation,
diagramCopy.getName()), affectedFiles) {
protected CommandResult doExecuteWithResult(
IProgressMonitor monitor, IAdaptable info)