Hibernate Tools 3.2.0.beta6 - New and Noteworthy

Previous new and noteworthy for 3.1.0.beta5

Release notes


General


Eclipse 3.2 & WTP 1.5

This version brings runs on the latest and greatest Eclipse dependencies.

This also has the consequence that the plugins can not run on Eclipse 3.1 and WTP 1.0 since some of the new API have already been utilized and some previous internal API is now public API in Eclipse 3.2/WTP 1.5


Query editing


Criteria Editor

After being away too long, the Criteria Editor is back. This editor allow you to enter Criteria's and afterwards execute them and introspect the result; just like with the HQL Query editor.

The Criteria Editor has syntax highlighting and code completion and a predefined "session" variable you can use to built up a criteria and execute it.


Improved HQL code completion

The HQL code completion now supports code completion against alias and properties, making it even more easy to enter HQL queries.


Java Inline HQL editing

HQL code completion is now made available inside java editor strings, including inside @NamedQuery annotations.

This feature is only enabled on projects that has enabled Hibernate 3 support in the project properties. The related console configuration should also be expanded so the SessionFactory is built. We will make this more automatic in a future release


Java Inline HQL validation

HQL code inside @NamedQuery annotations will now be validated for syntax errors. If a query cannot be validated the query will be listed in the Problems view and get a red "squiggly" underline to show highlight the "bad" query.

Validation unfortunatly currently also require a bit more manual setup than it should. Something that will be fixed in a future release.

To enable validation you will need to run Eclipse with JDK 1.5 and enable Java Compiler/Annotation Processing and the Factory Path should include "org.hibernate.eclipse.jdt.apt.ui" before it will be activated.


Quick navigation from Java code to HQL/Criteria editor

Pressing Ctrl+1 on top of a java string or when a selection is highlighted provides a "quick navigation" from the java editor to the HQL or Criteria editor with the string or selected code.


Mapping/Configuration file editing


Icon overlay for Hibernate Tools content types

Files that Hibernate Tools provide some support for now has a small Hibernate icon overlay.

Normally the file icon for Hibernate related files is the generic XML icon provided by the WTP editor; with this change it should be easier to find Hibernate related files and see if the Hibernate Tools plugins is configured/loaded properly


Basic completion support for persistence.xml

Added basic (experimental) code completion for persistence.xml files. It is basically the same as provided for hibernate.cfg.xml completion.

bb