Recipe 3.16 Commenting Out a Section of Code

     

3.16.1 Problem

You want to comment out a long section of code.

3.16.2 Solution

Select Source Comment.

3.16.3 Discussion

All you have to do is to select the lines to comment out and then select Source Comment. A single-line comment, // , will appear in front of all the lines. To uncomment them, just select Source Uncomment.

3.16.3.1 Eclipse 3.0

Eclipse 3.0 also enables you to surround code in a block comment ( /*...*/ ). Just select Source Add Block Comment. To remove the comment, select Source Remove Block Comment.

3.16.4 See Also

Chapter 2 of Eclipse (O'Reilly).



Eclipse Cookbook
Inside XML (Inside (New Riders))
ISBN: 596007108
EAN: 2147483647
Year: 2006
Pages: 232
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net