I am trying to create a java file from scratch using AST but it is painstakingly taking me longer to finish. What I have in mind is create the java file, then create the project and package and then copy that file to that package. Is there a way to do this?
Thanks.
I use Apache Velocity, in order to create Java classes from templates. In my case, i had to create from (velocity) templates some classes (and maven pom) using Eclipse Wizards. But if you want to modify these classes, then the best choice would be AST/JDT.
http://sdqweb.ipd.kit.edu/wiki/JDT_Tutorial:_Creating_Eclipse_Java_Projects_Programmatically
shows how to create a java project using JDT and configure your classpaths subsequently.