Bug 116224 - Notation meta-model support for coordinate systems
Summary: Notation meta-model support for coordinate systems
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: Notation (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 enhancement
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2005-11-14 09:23 EST by Steven R. Shaw CLA
Modified: 2020-02-18 06:11 EST (History)
1 user (show)

See Also:


Attachments
Patch for GMF containing notation meta-model coordinate system support (216.54 KB, patch)
2006-01-24 16:16 EST, Steven R. Shaw CLA
ahunter.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven R. Shaw CLA 2005-11-14 09:23:24 EST
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.
Comment 1 Steven R. Shaw CLA 2006-01-24 11:16:14 EST
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.
Comment 2 Steven R. Shaw CLA 2006-01-24 14:11:40 EST
TODO:
- Hide MeasurementUnit from Advanced properties and/or make it unsettable?
- Fix problem with unresolved decorator getting installed on lines eroneously.
Comment 3 Steven R. Shaw CLA 2006-01-24 16:16:05 EST
Created attachment 33542 [details]
Patch for GMF containing notation meta-model coordinate system support

Patch for GMF containing notation meta-model coordinate system support
Comment 4 Steven R. Shaw CLA 2006-01-27 15:33:04 EST
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 
Comment 5 Richard Gronback CLA 2008-08-13 13:06:53 EDT
[target cleanup] 1.0 M5 was the original target milestone for this bug
Comment 6 Eclipse Webmaster CLA 2010-07-19 12:30:00 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug