Erik Englund wrote on Mon, 04 April 2011 19:53 |
I have created a simple GMF library based off the Library EMF Model. I've modified it such that a library can contain a Library and I created another root object Bookstore that also contains Books. For one when I create a Diagram based off this model I get lots of duplicate Edit Parts. For example: LibraryEditPart Library2EditPart |
Erik Englund wrote on Mon, 04 April 2011 19:53 |
Secondly, I get strange behavior whenever I drag a sub library out into the root context. I get two libraries to show up in the root context. |
Erik Englund wrote on Mon, 04 April 2011 21:51 |
So then I have a question on best practices. How should I go about customizing the behavior of this edit part. Should I use the edit policy extension point to change its behavior. Or should I override the behavior in each of the generated edit parts by marking them generated not. |
Erik Englund wrote on Mon, 04 April 2011 21:51 |
My big problem is that in my diagram I want to display as root nodes items that are not directly accessible from the root element of the model. Should I do this by providing my own CanonicalEditPolicy? |
Erik Englund wrote on Mon, 04 April 2011 21:51 |
If so how should I register it. I'd prefer to not have to reference any of the VISUAL_ID generated by the tooling since those could possibly change if my model changes. |
Erik Englund wrote on Mon, 04 April 2011 19:53 |
I have created a simple GMF library based off the Library EMF Model. I've modified it such that a library can contain a Library and I created another root object Bookstore that also contains Books. For one when I create a Diagram based off this model I get lots of duplicate Edit Parts. For example: LibraryEditPart Library2EditPart |