Community
Participate
Working Groups
See Taipan example ShipViewFactory. It is adding annotations to the View for the modelID and visualID. This is unnessarily added to the file format and adding an extra EObject memory requirement (to all views?) which is potentially very heavy weight. 1. modelID could be derived instead from the semantic EObject element. i.e. EObject semanticEl = containerView.getElement(); EClass eclass = semanticEl.eStaticClass(); EPackage package = eclass.getEPackage(); if (package instanceof TaiPanPackage) { ... // probably good enough here to identify it as part of the taipan meta-model } 2. viewID should be stored in the view type instead of an annotation i.e. view.setType("1002")
>1. modelID could be derived instead from the semantic EObject element. i.e. What about having several diagram types for the same meta-model? If we will have two different ViewProviders working with the same metamodels, but creating different views - we have to determine the type of the diagram we are working with using parent view element.. BTW, I really do not think that it is big overhead to create an annotation object for each view.. >2. viewID should be stored in the view type instead of an annotation i.e. Yes, that's good improvement. We where thinking about it, but just for now store viewID as an additional annotation to not change all the rest of existing templates.
Actually the overhead is potentially huge... It's about 130 bytes for a single EObject, if this is multiplied by every view in a shape including list items then it could be considerable. If we consider the ship view from Taipan with 20 cargo items: 1 master view 2 sub views 20 list item views = 23 x 130 = 4K per shape. If you consider a large model with many diagrams in memory (UML perhaps), it's not unreasonable to have 100 different diagrams with an average of 20 shapes per diagram. = 4K x 100 x 20 = 8 Megabytes Regarding the example you gave, to determine the diagram type, you could simply navigate to the diagram and check it's type. i.e. view.getDiagram().getType()
Hi Alex, Do we plan to fix this one? Thanks - Fred
There are still some questions connected with shortcutting functionality (AFAIU, the same functionality will be provided by runtime). But, in general yes. M6.
Visual ID <-> View.getType() Model ID <-> Diagram.getType() Additional annotation holding Model ID will be created only for shortcuts.
[target cleanup] 1.0 M6 was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component Generation was the original product and component for this bug