In order to add rulers to an existing GEF editor:
RulerProvidercreateGraphicalViewer to inject a
RulerComposite as the top level component.getGraphicalControl to return the
RulerCompositeThe “logic” GEF example includes rulers and is a good place to start. Under the hood what the RulerComposite does is add two new graphical viewers to your editor, one for the north and one for the west rulers. GEF rulers can only mark pixels, inches, or centimeters. If you want anything else, you’ll have to override the RulerComposite and several other classes. I’ll get to that in a future entry too.
I know this isn’t a lot of info, but hopefully it’s enough to get someone started.
Commentary