Community
Participate
Working Groups
Follow-up for bugzilla 112788. Currently the notation meta-model is not coordinate specific and will take on the coordinate system of the diagram editor. However, for interoperability usecases between different types of Editors, (one Editor pixel based, another Editor Himetric), then the coordinate system type needs to be persisted in the notation meta-model. i.e. copying a shape from one Editor into another different type of Editor.
This is going to be supported at the Diagram level in the notation meta-model. The diagram will store the coordinate system and all views will inherit that coordinate system if they are contained in the diagram. This will mean an api change in the DiagramRootEditPart to disallow override of getMapMode. This method will be made final. Instead, clients should initialize the measurement unit for their editor in the DiagramViewFactory for their editor. The default unit is still in HiMetric coordinates.
TODO: - Hide MeasurementUnit from Advanced properties and/or make it unsettable? - Fix problem with unresolved decorator getting installed on lines eroneously.
Created attachment 33542 [details] Patch for GMF containing notation meta-model coordinate system support Patch for GMF containing notation meta-model coordinate system support
Purpose: Added support in the notation meta-model for a measurement unit. This is important for interoperability use-cases between editors to determine how to map coordinates from one editor to another. A new structural feature (unchangeable) was added to the Diagram object that is an enumeration literal representing the coordinate system for the diagram editor. This value is propogated up to the root editpart, consequently it is no longer necessary for clients to initialize the mapmode by overriding the DiagramRootEditPart#getMapMode api. Instead they need to initialize the measurement unit of the notation Diagram object in their view factory. An example can be seen in the geoshapes editor. @see GeoshapesDiagramViewFactory#getMeasurementUnit() Note: clients overriding DiagramRootEditPart#getMapMode will have a compile error since it is now marked as "final". Activities: bugzilla 116224 gmf-head sshaw 060119 Notation meta-model support for coordinate systems Code Reviewed by: Mohammed How tested: - ad-hoc testing with geoshapes / logic examples - testing copying from geoshapes to logic and vice versa... - diagram JUnits / draw2d JUnits
[target cleanup] 1.0 M5 was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug