Tooling Definition Model

Tooling definition model is yet another important aspect of diagram editor description. It is similarly designed like the graphical definition model and it is also independent of the domain model It includes the definitions of diagram palette (toolbar), additional main menu items, popup menus, other UI actions. This aspect of the diagram description is covered by Tooling Definition model. Currently, the Tooling Definition is basically used to describe desired diagram palette tools set, The palette consists of standard tools like Selection Tool, Zoom Tool and Creation Tool. It is possible to organize tools into groups and attach appropriate icons. Based on information stored in this model, the PaletteFactory code will be generated. This model is likely to evolve in the future in order to provide user with more options. Unlike Graphical Definition model, it is not possible to generate code only using information stored in this model. The Tooling Definition model should be referenced from Mapping Model to generate reasonable code.

One main problem that I faced using tooling definition was: If at all I changed the order of the tools after creating both graphical definitions and mapping model, the tools ID in the mapping model will not change. Hence I ended up drawing 'class' using 'interface' tool in class diagrams. The tooling model is mapped to domain model using some unique ID.
Reading the GMF tutorial will help you in creating tooling definitions. Its fairly simple and understandable.

No comments: