When running Toggle Comment on one or more lines of code, Eclipse adds the comment (//) at the beginning of the line. Is it possible to have Eclipse add the line comment where the code is indented at instead?
This can be fixed by running Source > Format but it would be nice if it can be done automatically when Toggling Comment.
Java Multi-line Comments Multi-line comments start with /* and ends with */ . Any text between /* and */ will be ignored by Java.
By convention, in Java, documentation comments are set inside the comment delimiters /** ... */ with one comment per class, interface, or member. The comment should appear right before the declaration of the class, interface or member and each line of the comment should begin with a "*".
A workaround solution is to have Eclipse do the formatting automatically: you can enable this through the "Save Action" preference.
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