Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-10-24
5
Medium Priority
?
704 Views
Last Modified: 2013-10-31
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
Comment
Question by:Rocking
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 2000 total points
ID: 39599639
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
 

Author Comment

by:Rocking
ID: 39601085
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
 
LVL 36

Expert Comment

by:mccarl
ID: 39604737
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
 

Author Comment

by:Rocking
ID: 39612126
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
 
LVL 36

Expert Comment

by:mccarl
ID: 39613098
Just need to confirm the steps you have provided
Yes they will. Hence why I posted them!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question