Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Code Formatter Inserting Comments
Code Formatter Inserting Comments [message #165831] Tue, 15 August 2006 14:13 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #165856 is a reply to message #165840] Tue, 15 August 2006 14:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: risticius.hotmail.com

Thanks for the reply. Yeah I've tried applying the code formatter but it
doesn't apply the comments!
I'm sure it should! :)
Re: Code Formatter Inserting Comments [message #165903 is a reply to message #165856] Tue, 15 August 2006 17:49 Go to previous messageGo to next message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
James Clark a écrit :
> Thanks for the reply. Yeah I've tried applying the code formatter but it
> doesn't apply the comments!
> I'm sure it should! :)
Open a bug report against JDT/Core and provide an example and the steps
to reproduce your issue.
Thanks
--
Olivier
Re: Code Formatter Inserting Comments [message #166519 is a reply to message #165856] Sun, 20 August 2006 14:27 Go to previous message
Eclipse UserFriend
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-----
Previous Topic:azzurri(clay)+ apache Derby ClientDriver
Next Topic:Additional information of Content Assist
Goto Forum:
  


Current Time: Sat Dec 21 13:54:48 GMT 2024

Powered by FUDForum. Page generated in 0.07523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top