按如下操作进行:         

Window->Preferences->General->Editors->Text Editors->Show line numbers

Text Editors的选项卡里面勾选Show line numbers,即可。