Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / May 2004

Tip: Looking for answers? Try searching our database.

Commenting Java

Thread view: 
Markos Charatzas - 20 May 2004 11:17 GMT
Hi there,

Is there a tool to aid in the generation of comments/javadoc?

As an example, I'd like to add a copyright on top of every java file I've  
already created.

Thanks in advance.
KC Wong - 20 May 2004 11:25 GMT
> Is there a tool to aid in the generation of comments/javadoc?
> As an example, I'd like to add a copyright on top of every java file I've
> already created.

You can always use Perl for this kind of tasks...
Markos Charatzas - 20 May 2004 11:35 GMT
Unfortunately I'm unfamiliar with Perl.

Do u think its a good idea to start learning Perl just to add some  
comments? :P

>> Is there a tool to aid in the generation of comments/javadoc?
>> As an example, I'd like to add a copyright on top of every java file  
>> I've
>> already created.
>
> You can always use Perl for this kind of tasks...
John - 20 May 2004 11:43 GMT
>>> Is there a tool to aid in the generation of comments/javadoc?
>>> As an example, I'd like to add a copyright on top of every java file  
[quoted text clipped - 7 lines]
> Do u think its a good idea to start learning Perl just to add some  
> comments? :P

My favourite hack is to replace "package myPackage;" with "HEADER
INFORMATIONpackage myPackage;"

John
Ryan Stewart - 20 May 2004 12:52 GMT
*fixed top post*

> >> Is there a tool to aid in the generation of comments/javadoc?
> >> As an example, I'd like to add a copyright on top of every java file
[quoted text clipped - 7 lines]
> Do u think its a good idea to start learning Perl just to add some
> comments? :P

If you're going to go that route, why not just write a Java program to add
the comments? Otherwise, I know NetBeans has an auto comment feature. I'm
not aware that it has something that will let you add one thing to a number
of files, but it does automatic javadoc formatting for you.
Roedy Green - 20 May 2004 17:06 GMT
>Do u think its a good idea to start learning Perl just to add some  
>comments? :P

You could just scan for the first /** of the program with index of and
add the comment just before the the next */.  Use Java.

Signature

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

BraileTrail - 20 May 2004 13:06 GMT
>Is there a tool to aid in the generation of comments/javadoc?
>
>As an example, I'd like to add a copyright on top of every java file
>I've already created.

NetBeans has an automated commenting tool but that requires you to open
each file individually and run the tool on it. No good for batch work.
However you can modify the NetBeans templates so that your copyright
statement is at the top of each new one you create. There is also an
automated copyright checker but I have not used that and I think it just
checks existing copyright statements and updates the date in them.

Another option if Jalopy, I remember that had fairly good javadoc
support and would insert and update copyright statements. It used to be
an open source project but is now commercial. The original open source
version should still be available on the net somewhere. Jalopy could be
used from various IDE's or in command line mode for batch jobs.

Regards,
David
--
Flip - 20 May 2004 15:38 GMT
> Is there a tool to aid in the generation of comments/javadoc?
This is probably a bit outside of the domain of tools you were looking for
but JB does it for us.  Ya, you have to open every file if you're not using
JB now, that's the down side.  But maybe Eclipse or the new Sun Creator (?)
(free IDEs :>) might have that feature as well, and you can just do it as
you work on the files?

Just a thought.  Good luck.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.