Well, I kind of found a solution. I use different ID's for EObjects and for Resources:
For EObjects, I get their fragment URI (their path inside the containing resource), make it a String, and use that as the seed to the MD5 hash. It turns out that the result of
fragmentURI().toString()
looks amazingly similar to what EMF generates as the UUID. :-)For Resources, I get the file's contents (model files are generally XMI/XML files) and calculate the MD5 hash on those.
The solution is a little heavy, specially the resource piece, but I make it up by minimizing the calls to the ID's generation algorithm, so it is ok for me. What it is is unique and reproducible across machines, which is what I needed.
Hope this helps someone in the future.