Code Formatter Inserting Comments [message #165831] |
Tue, 15 August 2006 14:13 |
Eclipse User |
|
|
|
Originally posted by: risticius.hotmail.com
I'm having trouble getting the code formatter to do what I want.
I have a load of code without file/class/method comments. I have edited
the code template to include the basics of this however I can't see how to
get the formatter to apply this to existing classes.
I thought that the "Enable Comment Formatting" option in
Preferences>Java>CodeStyle>Formatter>Edit>Comments would do this. But no
luck.
Any ideas? I can't find any useful information on writing code formatters.
This is particularly useless :)
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. jdt.doc.user/tasks/tasks-66.htm
|
|
|
Re: Code Formatter Inserting Comments [message #165840 is a reply to message #165831] |
Tue, 15 August 2006 14:24 |
Eclipse User |
|
|
|
Originally posted by: guerreroderrick.gmail.com
I think the code formatter only works when you're typing the new class.
If you want to apply the format to existing code, open the eclipse
editor to the code you want to format, click in the text somewhere and
hit Ctrl + Shift + F.
Guerrero
James Clark wrote:
> I'm having trouble getting the code formatter to do what I want.
>
> I have a load of code without file/class/method comments. I have edited
> the code template to include the basics of this however I can't see how
> to get the formatter to apply this to existing classes.
>
> I thought that the "Enable Comment Formatting" option in
> Preferences>Java>CodeStyle>Formatter>Edit>Comments would do this. But no
> luck.
>
> Any ideas? I can't find any useful information on writing code
> formatters. This is particularly useless :)
> http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. jdt.doc.user/tasks/tasks-66.htm
>
>
|
|
|
|
|
Re: Code Formatter Inserting Comments [message #166519 is a reply to message #165856] |
Sun, 20 August 2006 14:27 |
Eclipse User |
|
|
|
Originally posted by: hendrik_maryns.despammed.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
James Clark schreef:
> Thanks for the reply. Yeah I've tried applying the code formatter but it
> doesn't apply the comments!
> I'm sure it should! :)
The formatter doesn’t insert anything, it only formats. To
automatically insert comments, hit Alt+Shift+J on a method or class, or
enable the checkbox in the dialog which is creating the methods (such as
new class and many refactoring options).
H.
- --
Hendrik Maryns
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFE6HFSe+7xMGD3itQRAv7VAJ923ELg+pdwaJL5dMkTIP9+6BwuiwCe KdBx
9F+sEYnznxCIxBzVVUz98Po=
=mVEF
-----END PGP SIGNATURE-----
|
|
|
Powered by
FUDForum. Page generated in 0.07523 seconds