IStatus.ERROR,
DispelDiagramEditorPlugin.ID,
0,
"Incorrect document used: " + document + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", null)); //$NON-NLS-1$ //$NON-NLS-2$
}
IDiagramDocument diagramDocument = (IDiagramDocument) document;
final Resource newResource = diagramDocument.getEditingDomain()
.getResourceSet().createResource(newResoruceURI);
final Diagram diagramCopy = (Diagram) EcoreUtil
.copy(diagramDocument.getDiagram());
try {
new AbstractTransactionalCommand(
diagramDocument.getEditingDomain(),
NLS.bind(
Messages.DispelDocumentProvider_SaveAsOperation,
diagramCopy.getName()), affectedFiles) {
protected CommandResult doExecuteWithResult(
IProgressMonitor monitor, IAdaptable info)