How can I show line numbers in Eclipse?

前端 未结 16 1290
无人共我
无人共我 2020-11-30 16:14

How can I show line numbers by default in Eclipse?

相关标签:
16条回答
  • 2020-11-30 17:05

    Go to Windows → Preferences → General → Text Editors → Show numberlines. Click OK, then Apply changes. Then it will show the line count automatically.

    0 讨论(0)
  • 2020-11-30 17:05

    this will be the appropriate solution for asked question:

    String lineNumbers = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER; EditorsUI.getPreferenceStore().setValue(lineNumbers, true);

    0 讨论(0)
  • 2020-11-30 17:06

    Open Eclipse

    goto -> Windows -> Preferences -> Editor -> Text Editors -> Show Line No

    Tick the Show Line No checkbox

    0 讨论(0)
  • 2020-11-30 17:08

    Eclipse has a search feature in the top left box of the Preferences. Type in 'line numbers' in that search box, and presto...

    In case you're tired of googling each time you forget...

    0 讨论(0)
提交回复
热议问题