- This topic has 3 replies, 3 voices, and was last updated 20 years, 9 months ago by nosrema.
-
AuthorPosts
-
mercatorgeoMemberI don’t know if this is a MyEclipse or an XDoclet question, but here goes:
Is there a way to modify the templates for the generated classes?
Currently, I get a “replace this method with a useful method” method, which is, for me, completely useless, especially in a file that says:
“Generated by XDoclet – Do not edit!” meaning that any changes will be lost at the next run of XDoclet.
I’ve looked for .xdt files on my harddrive, but I found none.oops! I now see that the templet method was actually present in the EJB that was generated using new -> EJB! 😳
Riyad KallaMemberYou found what you wanted?
mercatorgeoMembersorry for the messy post above.
I was confused by the sample method which had been added to my test EJB entity bean. I only noticed it in the generated remote class, and I thought it had been added there by the XDoclet generation.A little while after posting, I saw the “generate sample method” option in the New -> EJB wizard.
What I would like to be able to modify now, are the EJB class template files. There are large amounts of javadoc for all of the EJB methods if you generate them. I would like them generated, but without the complete explanation that is currently put into the javadoc comments. Is that possible?
nosremaMembermercatorgeo,
You could just edit the template files directly. The EJB class template file lives in your ${MYECLIPSE_INSTALL_DIR}/eclipse/plugins/com.genuitec.eclipse.wizards_${ME_VERSION}/Templates/. There are three EJB files: EjbEntity.java, EjbMessageDriven.java, EjbSession.java. Make a backup of these files and then you can edit them to your liking. Be aware that there are expression tags in those files that are used in the templating system. It doesn’t look like there are any template expressions in the javadoc comments so you should be ok.
nosrema
-
AuthorPosts