Does anyone know if it would be possible to hide java comments in Eclipse? Is there any trick I could try?
Eclipse: Change the block comment style of ctrl+shift+/
Simply go to: Window - Preferences - Java - Code Style - Code Templates - Comments - Types - Edit... and change ${user} to whatever you want. Also go to: Window - Preferences - Java - Editor - Templates - @author - Edit... and change ${user} to whatever you want.
CTRL + SHIFT + \ –> to uncomment block of code, which is already commented.
Finding comments is easy: search for "/*" or "//". And since comments have no formal relation to code, when is a comment "about" the code nearby, and when is it just a comment ("a sonnet to ...")?
You can fold most block /* ... */
comments to a single line. You can't do that inside code blocks (method bodies, static blocks, etc.) and maybe a few other places. You also can't collapse multiple lines of // ...
style comments.
You could always change the syntax highlighting colors so the comments are in the background color. ;)
To turn on folding: Windows->Preferences->Java->Editor->Folding
Enabling 'Folding' in the preferences dialog lets you use the '+' and '-' buttons next to the line numbers to hide comments. Do do this...
Windows->Preferences->Java->Editor->Folding
Then the comments will go away!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With