Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 152743 - [rulers][api] provide an abstract base class for rulerColumn contributions
Summary: [rulers][api] provide an abstract base class for rulerColumn contributions
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P2 normal (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Tom Hofmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-03 11:23 EDT by Tom Hofmann CLA
Modified: 2006-08-28 12:47 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2006-08-03 11:23:19 EDT
From bug 25793:

Provide an abstract base class for contributable rulers. It should create and manage a canvas, scrolling, repainting, etc. Implementations would get the following hooks:

- getText(int modelLine)
  - must return the text for a given model (IDocument) line

- getBackgroundColor(int modelLine)
  - returns the background color for a given line

- paintLine(GC, int modelLine)
  - paints a single model line
  - default implementations uses getColor(int) and getText(int) to draw text and
    background colors.

- paintLines(GC, ILineRange visibleLines)
  - implements painting of the visible model lines. Default implementation calls
    paintLine(GC, int) for every model line

- invalidation methods, so that an implementation can trigger redrawing of a certain line range.

- setWidth(int), setFont(Font)
Comment 1 Dani Megert CLA 2006-08-08 12:39:09 EDT
Tom, this is already in M1, isn't it?
Comment 2 Tom Hofmann CLA 2006-08-09 06:38:55 EDT
(In reply to comment #1)
> Tom, this is already in M1, isn't it?

Yes, fixed > 20060807

See org.eclipse.ui.texteditor.rulers.AbstractRulerColumn.

Comment 3 Dani Megert CLA 2006-08-09 15:34:41 EDT
Verified that it is in drop I20060809-1200.
Comment 4 David Coppit CLA 2006-08-28 12:35:17 EDT
Question: Should org.eclipse.ui.workbench.texteditor.rulerColumns default to this new AbstractRulerColumn? Currently the extension point wants to create a class derived from org.eclipse.ui.texteditor.rulers.RulerColumn. I'm using I20060810-1230.
Comment 5 Dani Megert CLA 2006-08-28 12:47:50 EDT
No, it's correct the way it is now but the names are misleading. I filed bug 155424 for that.