Add the automatic prompt function to the hibernate configuration file (*. HBM. XML) of Eclipse.
When editing the *. HBM. xml file, myeclipse provides the automatic prompt function, but eclipse does not have the automatic prompt function. Manually add:
1. Open any *. HBM. xml file in the project and check the file header, as shown below:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
Find
Http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd (depending on the hibernate version, the author uses hibernate3.6.7 ).
2. Decompress hibernate3.jar used in the project and find the hibernate-mapping-3.0.dtd file under hibernate file under org file after decompression.
3. eclipse-> window-> preferences-> Web and XML-> XML catalog, select Add of XML catalog entries... button, in the pop-up add XML catalog entry dialog box, select the hibernate-mapping-3.0.dtd in step 2 in location, select URI for key type, enter http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtdin step 1. OK.
Open the *. HBM. xml file in eclipse, and you can have the automatic prompt function as in myeclipse.