@Override
public DiagramGenerator copyToImage(DiagramEditPart part,
IPath destination, ImageFileFormat format,
IProgressMonitor monitor) throws CoreException {
DiagramGenerator result = super.copyToImage(part, destination, format, monitor);
// keep track of the part -> destination
partDestinationMap.put(part, destination);
partEObjectMap.put(part, part.resolveSemanticElement());