- GMF Troubleshooting
- GMF Troubleshooting 2
- GMF Troubleshooting 3
- GMF Troubleshooting 4
- GMF Troubleshooting 5
- GMF Troubleshooting 6
- GMF Troubleshooting 7
- GMF Troubleshooting 8
- GMF Troubleshooting 9
- GMF Troubleshooting 10

You've tried to add too many elements to the definition. For example, the diagram on the right was generated with the following code:
- .gmfgraph:
- Page: set as node
- title: set as label
- content: set as label
- links: set as link -- shouldn't be selected
- Link: set as node -- should be a link
- link: set as link -- shouldn't be selected
- .gmfgraph:
- Page: set as node
- links: set as link -- shouldn't be selected
- Link: set as node -- should be a link
- set as link -- shouldn't be selected
To edit the model after generating the application...
- After changing the .ecore file
- Right click .gmfmodel
- Select "Reload..." and select your .ecore file
- It should load the model again
However, my version of GMF doesn't properly reload changes, especially to attributes of the .ecore (for example, setting 'Containment' to true). The best solution in this case is to just delete the whole .genmodel and recreate it. Make sure you set the base package again!!!

This problem occurs when you try and place something on the canvas, which cannot be contained in it. For example, you're trying to insert a HTML into a SPAN.
The solution is to open the .ecore model for the canvas element (e.g. Application), and set it's 'Containment' property for the problematic reference to true, like so:


Make sure you then properly re-generate the .genmodel and re-generate the diagram code.

This error occurs when you try to save a model like so:
<a> <b /> <b /> </a>
But items of b cannot be contained in a. The solution to this is to set the 'Containment' property for a's b to true. You then have to recreate the .genmodel (follow instructions above) and go through the rest of the generation instructions.
Alternatively, if you have been changing the Ecore model around and are trying to open an old model file, it may be because GMF no longer knows what to do with the old elements - it doesn't want to delete them, but it can't place them anywhere else, so it crashes out. You might have to edit your model manually.