How to change Java comments template?
10,717
Solution 1
This has been pissing me off for some time until I finally found the solution. He mentions this is work around, it does not matter for me - it works like a charm. Don't forget to plus him, he is life savior!
Solution 2
I have option Blank line before Javadoc tags in preference->Java->Code style->Formater, click on Edit button, open Comments tab and look at Javadoc comment settings. May be it helps you.
Author by
WoooHaaaa
Updated on June 04, 2022Comments
-
WoooHaaaa almost 2 years
I use /** + ENTER to generate javadoc, but i found there's a whitespace before line 3:
1 /** 2 * Test. 3 * 4 * @author xxx 5 */
Every time i try "source - format" in eclipse,the white space comes out. How can i remove this whitespace in the comments template somewhere ?
-
Yahor10 about 12 yearsDid you try preference->java->Code Style->Code Templates.And edit your template?
-
WoooHaaaa about 12 yearsI have tried it already, but i didn't find any thing can solve the problem since there's no option about whitespace in comment settings.
-
mgibsonbr over 11 yearspossible duplicate of Eclipse formatter adds space in empty comment lines
-
-
WoooHaaaa about 12 yearsThanks,but i need the blank line without a whitespace before it(Check my code you will find a whitespace after * in line 3).
-
Manoj Govindan about 12 yearsThe work around mentioned in stackoverflow.com/a/7727232/1108032 doesn't work if you right click on a package and execute the
Format
action. -
F.O.O over 8 yearsInclude answer in case link is broken.
-
Boris Strandjev over 8 years@F.O.O This is link directlly to Stackoverflow - chances are that my answer will get deleted before the one i link to. Furthermore I deliberately link without including the answer contents - thus the updates there will immediately be reflected in my answer too, you see :)
-
F.O.O over 8 yearsI did think this was to an external site :D. sorry.
-
Sam Ginrich almost 3 yearsWhich is the actual solution. @stackoverflow: Plz provide concepts against voting mobs.