For example, I want to print my source code from line 526 - 561 and I also want the line numbers to appear.
Asked
Active
Viewed 1,715 times
0
-
1basically you want this functionality somewhere in eclipse , AFAIK , its not there – Hussain Akhtar Wahid 'Ghouri' Nov 08 '13 at 14:19
-
1What happens, after selecting lines 526 - 561, when in the print dialog you check "print selection?" – Joop Eggen Nov 08 '13 at 15:10
-
Thats how i would expect it to work if the line numbers are shown in the editor it should work. – JBA Nov 08 '13 at 15:11
-
Step 1: print out the lines you want. Step 2: take an ink pen, and manually write in line numbers (although you usually only need one every 10 lines or so). – AJMansfield Nov 08 '13 at 15:49
-
http://stackoverflow.com/a/2873363/1324631 appears to answer your question. – AJMansfield Nov 08 '13 at 15:50
2 Answers
0
According to this:
Is there a way to copy code from eclipse including ine numbers
I would say you just have your line numbers displayed in eclipse (see above question on howto) then mark lines 526-661 and press Ctrl+P, select "Print Selection" and see what happens. (I currently realy dont have ANY possibility to test it myself, sorry)
0
For a short snippet of code like the OP's 36 lines, I'll usually just copy the code from Eclipse, paste it into Geany (which runs in Linux, OSX, and Windows), and print it from there. With Geany set to show and print line numbers, of course.

David Yockey
- 595
- 3
- 11