• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 717
  • Last Modified:

auto generate java doc for new file in java (eclipse env)

Hi,

I am working in eclipse , i have created a web project in java.

what i need is whenever i create a new java file the information like

copyright
author
datetime
...
...

should come automatically

How to achieve the above in eclipse?
0
Rocking
Asked:
Rocking
  • 3
  • 2
1 Solution
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Go into Window -> Preferences and then in the tree on the left, drill down into Java -> Code Style -> Code Templates. Then on the right, open up the Comments parent item and configure whatever you need there. More than likely, for the info that you mention above, you would be looking at either the "Files" or the "Types" entries to be setup. Play with that and see how you go, and if you still have issues, post back here and we can help further.
0
 
RockingAuthor Commented:
i am doing the same but the problem is i need to auto generate the header/comments by rights click the java file, wht i need is the header part should be automatically added whenever the new file is created (i.e no need to do it manually).

Secondly if i need to create a template for java doc which i can use in other project is there any way to do it?
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
I am unsure about the two items that you are asking about. It is hard to understand what you have written. I believe the solution that I posted should fulfil everything that you need.
0
 
RockingAuthor Commented:
Just need to confirm the steps you have provided will add comments(say header ) the moment java file is created or need to manually generate the java doc.
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Just need to confirm the steps you have provided
Yes they will. Hence why I posted them!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now