jewles
jewles

Reputation: 487

Update eclipse XML code complete when XSD changes

I am using the XML editor in Eclipse to modify xsd files and xml files. I am able to get validation and code completion working properly but when I edit the xsd file the validation seems to update immediately while the code completion is out of date.

An example to illustrate the problem. Lets start with the example XML project (File > New > Example... > XML > Editing and validating XML file.) and use the GolfCountryClub example. Say I want to add suffix to a persons name (Jr, Sr, etc). First I add it to the xml file and the validator complains that is is invalid.

Added element that is not in XSD so it is invalid

So I update the xsd to include the new element.

updated xsd with new element

Once the xsd is saved the xml file is revalidated and error goes away. However, the code assist doesn't automatically include the new element.

updated validator but not updated content assist

The only way I have found to force the content assist to update with the new xsd is to either restart eclipse or close and open the containing project. Is there something I'm missing? Is there a setting somewhere to autoupdate the code completion? Is this a bug? I am using Indigo with the just downloaded version (3.3.2) of the XML editors and tools feature from WTP.

Upvotes: 1

Views: 1587

Answers (1)

nitind
nitind

Reputation: 20003

Look for the toolbar button that allows you to Reload Dependencies. It should flush any cached information from the referenced schemas.

toolbar

Unrelated, try a version newer than Indigo. It's out of date--the current version of that Feature is 3.5.2.

Upvotes: 4

Related Questions