views:

124

answers:

2

Eclipse text editors has this nice vertical rulers at both sides where bookmarks and annotations are shown with little dots, so that you navigate real quick to the line. I've got to do something similar, but not with the text editor, - with some large list or a table. How would you go about it? Is there anything in eclipse RCP I can re-use? Or just take Canvas and start drawing stuff with SWT wizardry? I really don't want to reinvent the wheel, having a model would be real great. There must be something which already exists..

Can anyone give me a direction where to dig?

+1  A: 

You can look how this zone (Ruler) is setup in the CompilationUnitEditor.

It is an IVerticalRuler (see JavaDoc, and one standard implementation), actually used by a SourceViewer: that last class actually set up the vertical ruler zones.

VonC
That was it. The only problem in VerticalRuler is that it's permanently coupled with text editors and all the plugins which come with it, this is a huge useless dependency in my case. But the source code of default implementation actually helped me to extract the gist. Now I've got huge data table with a ruler mapping everything nicely. Thanks!
Dima
A: 

did you find the answer? this is exactly what I am looking for:-)

george