// TODO Fix 4 This seems to produce some maintainReferences error: "Cannot resolve ... in Model /System"
process.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS | ModelObject.UNLINK_FROM_REPRESENTATION);
if (copyFlavor != null && (process.getNodes().hasNext() || process.getTextElements().hasNext()))
{
Transferable ret = new SimpleTransferable(process, copyFlavor);
if (copiedSourceNodes.size() == 1)
{
// If we have a single node selected, add the model qualifier of the node in addition
Node node = (Node) copiedSourceNodes.get(0);
ModelQualifier qualifier = node.getQualifier();
MultiTransferable mt = new MultiTransferable();
mt.addTransferable(ret);
mt.addTransferable(new SimpleTransferable(qualifier, ClientFlavors.MODEL_QUALIFIER));
ret = mt;
}
return ret;
}