1, open MyEclipse, find the menu bar "window"----> "Preferences (Preferences)";
2, in the left-hand navigation menu bar, find "myeclipse"----> "Files and Editors"----> "xml"---> "xml Catalog";
3, in the right side of the interface, select "User Specified Entries", click on the right "Add ...";
4, click "File System ..." In the pop-up "add XML Catalog Element" dialog box, add the path to the DTD file for the location input box, or click "Workspace", Add the path to the DTD file for the location input box;
5, use a text editor to open this DTD file and find the corresponding <! DOCTYPE ...> Document type declaration,
For example, Hibernate profile: The DTD file required for Hibernate.cfg.xml is:
Hibernate-configuration-3.0.dtd
After opening the HIBERNATE-CONFIGURATION-3.0.DTD, find the following:
<! DOCTYPE hibernate-configuration Public
"-//hibernate/hibernate Configuration DTD 3.0//en"
"Http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" >
6, in the Drop-down box to the right of Key type: Three types: Public Id,system Id,uri),
According to the <! in HIBERNATE-CONFIGURATION-3.0.DTD Public in the doctype...>,
Select the public ID (or simply select "URI");
7, "Key:" In the text box to the right, the <! in the HIBERNATE-CONFIGURATION-3.0.DTD Doctype...>
, and then paste it into the text box to the right of Key:
Note that the copy does not have double quotes "";
8, click "OK", you can see "User Specified Entries" has been added DTD (key);
Similarly, the hibernate-mapping-3.0.dtd of this DTD can also be replicated;
9, restart the myeclipse can be, note if the hint does not come out,
And at the bottom left of the status bar, "Content Assist not available in the current location",
Please type a space at the cursor position and try again using alt+/;