Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Add comment to existing java file?(file comments)
Add comment to existing java file? [message #663155] Mon, 04 April 2011 07:13 Go to next message
Nexon  is currently offline Nexon Friend
Messages: 1
Registered: April 2011
Junior Member
Hi, all.

could anyone tell me how to add a file comment to an existing java file

I was trying to add comments on a class, constructors, and methods in a java file. I successfully got the comments added and almost happy with the Template feature (Thanks, Eclipse lol)

But every time i tried adding a file comment to an existing file, I could see a class comment repeatedly generated(I know I will get a beautiful file comment at the top if I create a new java file)

Help me out pls!
Re: Add comment to existing java file? [message #663286 is a reply to message #663155] Mon, 04 April 2011 14:21 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 04-Apr-11 01:13, Nexon wrote:
> Hi, all.
>
> could anyone tell me how to add a file comment to an existing java file
>
> I was trying to add comments on a class, constructors, and methods in a
> java file. I successfully got the comments added and almost happy with
> the Template feature (Thanks, Eclipse lol)
> But every time i tried adding a file comment to an existing file, I
> could see a class comment repeatedly generated(I know I will get a
> beautiful file comment at the top if I create a new java file)
>
> Help me out pls!

If I understand accurately, this is a question about the automatic
templates for comments and not about how to edit a comment in a Java file.

These templates are controlled, if you do not like the defaults, at
Window -> Preferences -> Java -> Code Style -> Code Templates ->
Comments. Experimentation will result in the action you prefer;
thereafter, you can save how this is done via the Import button and
restore this behavior to another Eclipse workspace via Export.

Hope this helps.
Re: Add comment to existing java file? [message #663696 is a reply to message #663155] Wed, 06 April 2011 08:41 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 04.04.2011 09:13, Nexon wrote:
> Hi, all.
>
> could anyone tell me how to add a file comment to an existing java file
>
> I was trying to add comments on a class, constructors, and methods in
> a java file. I successfully got the comments added and almost happy
> with the Template feature (Thanks, Eclipse lol)
> But every time i tried adding a file comment to an existing file, I
> could see a class comment repeatedly generated(I know I will get a
> beautiful file comment at the top if I create a new java file)
How exactly did you try to add that file comment? The easiest is to
define a template (Java > Editor > Templates).

Dani
>
> Help me out pls!
Previous Topic:(Resolved) Executable Jar Problem
Next Topic:how to set arm-elf-gcc toolchain in eclipse?
Goto Forum:
  


Current Time: Tue Apr 16 04:16:41 GMT 2024

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

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

Back to the top