what plugins do i need to install on eclipse so that .java files will show line number? how about show line number on .xml/.html as well?
There is also a simpler way: just right click on gutter (left border of your editor window in which your code resides) and enable them.. there is a specific option there.

Window Menu -> Preferences -> General -> Editors -> Text Editors -> check Show line numbers
Easy click on left bar (where line numbers will show) and clikc Show line numbers.
What if line numbers are not displayed even after checking the line number option in Window->Preferences->Editors->Show Line Numbers checkbox. I am facing this issue.
来源:https://stackoverflow.com/questions/3979809/eclipse-java-code-display-linenumber