Window → Preferences → General → Editors → Text Editors → Show line numbers.
Edit: I wrote this long ago but as @ArtOfWarfar and @voidstate mentioned you can now simply:
Right click the gutter and select "Show Line Numbers":
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…