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 03:13 Go to next message
Nexon  is currently offline Nexon
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 10:21 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3153
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 04:41 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
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: Wed Aug 27 23:31:05 EDT 2014

Powered by FUDForum. Page generated in 0.01893 seconds