jEdit Community - Resources for users of the jEdit Text Editor
display line numbers in gutter
Submitted by xlinuks on Saturday, 17 November, 2007 - 13:41
Hi!
I'm trying to set (programmatically) jEdit to display the line numbers at startup (These only appear if one presses Ctrl+E+T, jEdit doesn't seem to remember whether showing line numbers was turned on or off last time).
I think I have to tinker with the class Gutter.java from package org.gjt.sp.jedit.textarea
The method Gutter.setExpanded( true ); (I've put it in different locations) doesn't seem to work.
Does anybody have any idea what I'm doing wrong?
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Setting programmatically line numbers in jEdit gutter.
by avega on Sat, 27/11/2010 - 17:44
Hello!

I'm working in the same topic, in the context of a StandaloneTextArea. I've found the answer observing the StandaloneTextArea's initGutter() method. There, you can see how the gutter is set by mean of "view.gutter.lineNumbers" jEdit property.

Therefore, in my extending class (of StandaloneTextArea) constructor, I include the next call:

props.setProperty("view.gutter.lineNumbers", "true");

... in wich "props" is my instance variable storing jEdit properties.

I hope this can help you. Bye!

- Antonio
User login
Browse archives
« February 2018  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
33%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1092
Syndication
file   ver   dls
German Localization light   4.4.2.1   51053
Context Free Art (*.cfdg)   0.31   41260
JBuilder scheme   .001   17053
BBEdit scheme   1.0   16658
ColdFusion scheme   1.0   16636
R Edit Mode - extensive version   0.1   14919
Advanced HTML edit mode   1.0   14092
Matlab Edit Mode   1.0   14038
jEdit XP icons   1.0   13463
XP icons for jEdit   1.1   12487