Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Compositeruler and Sourceviewerconfiguration(Sourceviewerconfiguration failed)
icon5.gif  Compositeruler and Sourceviewerconfiguration [message #1001734] Thu, 17 January 2013 09:52
wijanarto wijanarto is currently offline wijanarto wijanartoFriend
Messages: 1
Registered: January 2013
Junior Member
Hi All,
i have strange code here (from net),

private IVerticalRuler createVerticalRuler() {
CompositeRuler ruler = new CompositeRuler();
LineNumberRulerColumn lineCol = new LineNumberRulerColumn();
lineCol.setBackground(c.getDisplay().getSystemColor( SWT.COLOR_GRAY ) );
lineCol.setForeground(c.getDisplay().getSystemColor( SWT.COLOR_BLUE ) );
ruler.addDecorator(0, lineCol );
return ruler;

public SourceViewer insertViewer(Composite c) {
new SourceViewer(c,createVerticalRuler(),

new NCEditorSourceViewerConfiguration());

return viewer.get(te.getSelectionIndex());

note : te : CTabFolder
My Question is :
a. when i configure and set the document (2 on above code), my application wont run
correctly but when delete line //2, everything running well, except no syntax
b. when i change line //1 with code below, and line //2 stay like before
viewer.add(te.getSelectionIndex(),new SourceViewer(c, new
my application run corrrectly, except no line number
c. How to add Line Number based on my code above ??
Please help ...!!!
Previous Topic:ICelleditor: show error and do not allow to loose focus until valid data is inserted
Next Topic:TreeViewer Databinding issues
Goto Forum:

Current Time: Thu Nov 26 05:07:44 GMT 2015

Powered by FUDForum. Page generated in 0.01559 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software