Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide comments and javadoc text in editor view?

Tags:

eclipse

The reason i (sometimes) want to hide the javadoc text is because in 3rd party apps it kinda confuses me. The fact that when i hover over an object the javadoc for that object appears is enough for me Solutions?

LE I have just found somewhat of a workaround which is enough (a collapse all comments command). But for the sake of education, is there anyway to completely hide (collapsing isn't completely hiding you know) the javadocs and OR the comments ?

like image 402
Loulou Avatar asked Sep 16 '11 03:09

Loulou


People also ask

How do I hide comments in Java?

Enabling 'Folding' in the preferences dialog lets you use the '+' and '-' buttons next to the line numbers to hide comments.

How do I collapse comments in Eclipse?

To fold comments go on 'Window' >> 'Preferences' and then in the tree, locate 'Java' >> 'Editor' >> 'Folding'. Select 'Enable Folding' and check 'Comments and Header Comments'.

How do you add comments to a Javadoc?

Add a Javadoc using automatic commentsType /** before a declaration and press Enter . The IDE auto-completes the doc comment for you.

How do I show comments in Eclipse?

PDT allows you to quickly and easily comment and uncomment code by selecting a line or a block of text and tagging it as a comment. Comments can be added to single lines of code (Ctrl + /) or blocks of code (Ctrl + Shift + /).


1 Answers

If you are using eclipse, you can "fold" comments by going to

Window->Preferences

And then in the tree, find:

Java->Editor->Folding

In there you can choose to Enable Folding, and then ensure that Comments and HeaderComments are checked for initally being folded.

like image 82
brianestey Avatar answered Oct 25 '22 01:10

brianestey