I have created an EMF model that can be loaded into a Resource at runtime from a legacy data representation. This gives me a ProjectResource extends Resource
.
I also have a diagram editor, created in GMF around the same ecore model. I can create an empty diagram file for this and load up the diagram editor.
I'd like to instantiate a diagram editor from my ProjectResource, but I'm having problems. It seems I can't create a diagram model from my domain model, without the domain model having a URI, and I can't launch a diagram editor without a diagram model. Am I going about this completely the wrong way?
I never solved this directly. What I will say though is that if you're trying to do this, you are probably trying to heavily customise how GMF works. Don't. You're better off using Graphiti, despite its poor documentation. (Use a combination of its source code, online examples and the docs and you will be fine).