Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] [GMF - API CHANGE] Bugzilla 112788 : API: Encapsulate MapMode / HiMetric coordinate system from clients


Description:
MapMode class is being deprecated.  GMF has been swept to remove occurrences of this class and replaced with a corresponding api that retrieves the IMapMode object from a context.


One breaking change if clients override RectangularDropShadow:
        RectangularDropShadow#getRightShadowDimension adds a parameter IFigure in order to retrieve IMapMode
        RectangularDropShadow#getBottomShadowDimension adds a parameter IFigure in order to retrieve IMapMode

New API Availability:

- Friday for RectangularDropShadow changes...other API is already available

- Friday for MapMode to be in deprecated state.

Old API Removal:

Wednesday, November 9 -- MapMode will be removed. (or later depending on feedback)...

Tracking:        
               
Bugzilla 112788 (see for further details).

Clients Taken Care of:      
 
GMF

Other Clients' Action:


If you are not concerned with reusing your figures with-in different Editors that have different coordinate systems then you can simply do a direct replacement of MapMode to MapModeUtil.getMapMode() which will continue to do a HiMetric coordinate mapping.  

Otherwise, to get maximum reuse out of your figures and editparts you would need to do the retrieve the IMapMode from an appropropriate context.  Replace occurrences to MapMode with API as follows:

1. Referencing MapMode from within a Figure
MapMode.DPtoLP        -->         MapModeUtil.getMapMode(this).DPtoLP

2. Referencing MapMode from within an EditPart
MapMode.DPtoLP        -->        getMapMode().DPtoLP          (api defined on GraphicalEditPart)

3. Other contexts
If you have access to the DiagramRootEditPart, then it has the main access point to retrieve the IMapMode --> getMapMode()


Back to the top