- This topic has 10 replies, 3 voices, and was last updated 18 years, 10 months ago by cdebracy.
-
AuthorPosts
-
cdebracyMemberIn C:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.hibernate_4.1.0\templates I see most of the templates that MyEclipse uses to generate the POJO’s when Hibernate does its thing.
What I don’t see is the template where the dao is generated. Also, does anyone have a list of variables that are exposed by Velocity for purposes of customizing the generated artifiacts?
Basically, I want to generate the comments necessary to keep my Checkstyle plug-in happy.
Thanks,
Chris
Riyad KallaMemberChris I’ll look intot his for you.
Brian FernandesModeratorChris,
That template directory is from our older tools and will be removed.
http://www.myeclipseide.com/products/eworkbench/public-src/myeclipse_templates_4.1.0.zip
Zip containing templates current to MyEclipse 4.1. Instructions for how to work with them are in the README in the zip.I think that should be all you need to know – but please let us know if you require further assistance,
Best,
Brian.
cdebracyMemberBrian,
Thanks alot. I’ll check it out.
Chris
cdebracyMemberBrian,
I notice that certain comments and methods should be generated if I’m using jdk5. However, even with the compiler set to 5.0, it’s not generating the generic list support that I see in the DAO templates.
How do I configure this to generate the correct methods?
Thanks,
Chris
Brian FernandesModeratorChris,
We have explicitly turned Java 5 generation off since we don’t officially support it yet.
If you want to try it, edit the template you want JDK 5 support for and at the top, add this line
#set ($jdk5=true)
Let us know how it turns out,
Best,
Brian.
cdebracyMemberBrian,
When might this support be in place? I’m currently getting this error:
java.lang.IllegalStateException: expected jdk5 to be bound to false but was to true
at org.hibernate.tool.hbm2x.TemplateHelper.removeFromContext(TemplateHelper.java:230)
at org.hibernate.tool.hbm2x.AbstractExporter.cleanUpContext(AbstractExporter.java:201)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:91)
at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:58)
at com.genuitec.eclipse.hibernate.wizards.MEDAOExporter.start(MEDAOExporter.java:74)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:342)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:262)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)Thanks,
Chris
Brian FernandesModeratorChris,
We will most likely include JDK5 support in a release post 4.1.1, which is a maintanence release.
I had no idea there would be a problem resetting the variable. The only suggestion I can make is to replace all instances of $jdk5 in your template to something else.. $cjdk perhaps and set that to true instead. Then you won’t be messing with a preset variable, and Velocity won’t have a problem.
Sorry for the inconvenience caused, but we still need to beef up JDK5 support until which point we don’t intend to support it at a UI level.
Let me know if you have further issues,
Best,
Brian.
cdebracyMemberBrian,
Thanks for the info. Do you have a timeframe for the 4.1.1 maintenance release?
Chris
Brian FernandesModeratorChris,
Sorry for my confusing sentence above. 4.1.1 is due sometime this week, but will not include JDK 5 support as it is a maintanence release.
We will look at supporting JDK 5 only after 4.1.1.Best,
Brian.
cdebracyMemberBrian,
Ah, missed the “post” 4.1.1 comment. I’ve manually added generics and comments so I’ll test those.
Thanks,
Chris
-
AuthorPosts