The 2010 update, as pointed out by OP and in this answer , the special line //@formatter:off in Eclipse 3.6 is enough.
This was not available at the time of the issue.
Original answer: June 2009, Eclipse 3.4 / 3.5
Using the Java Formatter ( Windows > Preferences > Java > Code Style > Formatter ), you can create a new Formatter tool profile.
On the Comments tab (in eclipse3.5), you can verify that in the " Javadoc comment settings " section, clear the " Format HTML tags " checkbox.
Check also the " Never join lines " in the " General settings " section.
Then your comment should be written like this:
/** * PSEUDOCODE * Read in user string/paragraph * * Three cases are possible: * <dl> * <dt>Case 1: foobar</dt> * <dd> do case 1 things</dd> * <dt>Case 2: fred hacker</dt> * <dd> do case 2 things</dd> * <dt>Case 3: cowboyneal</dt> * <dd> do case 3 things</dd> * </dl> * In all cases, do some other thing */
Note: I made a Javadoc comment, not a simple comment, because I believe that a comment with so much text can be better placed before the method. In addition, Javadoc sections have more formatting options for playback.
If it is in front of the method (true Javadoc), the HTML tags <dl> , <dt> and <dd> will help to correctly represent it in the Javadoc view.
VonC Jun 22 '09 at 5:45 2009-06-22 05:45
source share