org.eclipse.jface.text.source.IChangeRulerColumn Java Examples

The following examples show how to use org.eclipse.jface.text.source.IChangeRulerColumn. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SourceCodeTextEditor.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected IVerticalRulerColumn createLineNumberRulerColumn() {
	fLineNumberRulerColumn= new LineNumberChangeRulerColumn(getSharedColors()){
		@Override
		public void redraw() {
			for (IRulerPainter p : rulerPainters) {
				p.beforePaint();
			}
			super.redraw();
		}
		
		@Override
		protected void paintLine(int line, int y, int lineheight, GC gc,
				Display display) {
			boolean isPaintLine = true;
			Rectangle r = new Rectangle(0, y, getWidth(), lineheight);
			for (IRulerPainter p : rulerPainters) {
				isPaintLine = isPaintLine && !p.paintLine(line, r, gc, display);
			}
			if (isPaintLine){
				super.paintLine(line, y, lineheight, gc, display);
			}
		}
	};
	((IChangeRulerColumn) fLineNumberRulerColumn).setHover(createChangeHover());
	initializeLineNumberRulerColumn(fLineNumberRulerColumn);
	return fLineNumberRulerColumn;
}
 
Example #2
Source File: TypeScriptEditor.java    From typescript.java with MIT License 5 votes vote down vote up
/**
 * Creates a new line number ruler column that is appropriately initialized.
 *
 * @return the created line number column
 */
protected IVerticalRulerColumn createLineNumberRulerColumn() {
	/*
	 * Left for compatibility. See LineNumberColumn.
	 */
	fLineNumberRulerColumn = LineNumberChangeRulerColumnPatch.create(getSharedColors());
	((IChangeRulerColumn) fLineNumberRulerColumn).setHover(createChangeHover());
	initializeLineNumberRulerColumn(fLineNumberRulerColumn);
	return fLineNumberRulerColumn;
}
 
Example #3
Source File: AbstractThemeableEditor.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected IVerticalRulerColumn createLineNumberRulerColumn()
{
	fLineNumberRulerColumn = new CommonLineNumberChangeRulerColumn(getSharedColors());
	((IChangeRulerColumn) fLineNumberRulerColumn).setHover(createChangeHover());
	initializeLineNumberRulerColumn(fLineNumberRulerColumn);
	return fLineNumberRulerColumn;
}