Eclipse notes

A page on which to save some notes about the Eclipse developer platform.

Printing code from Eclipse

Story currently (Eclipse 3.4.1) seems to be that printing in Eclipse is primitive — no control over fonts or page margins.  That leads to a desire to print via some other tool that does provide that level of control.  One possibility is MS Word.  Going down that path means one wants to know:

  • How to copy and paste with the syntax highlighting intact
  • How to fix up any tab/space issues

… which is what the next to blurbs are about

Copy syntax-highlighted text

Eclipse (or at least the Java editor) has the capability to copy syntax-highlighted text in RTF format (so the formatting can appear for example in Word).

However, turns out that this feature is disabled if code-folding is enabled.  So you have to disable code folding:

Window > Preferences > Jave > Editor > Folding > uncheck “Enable Folding”


Show and fix up tab/spaces:  AnyEdit tools add-on

Available here:

Minor note:  Follow all the install instructions including the preferences settings, because some of the functionality does not appear in the UI otherwise.


Post a Comment

Required fields are marked *


%d bloggers like this: