Eclipse XSD Import Cache

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ahundiak
Posts: 7
Joined: Wed Mar 23, 2005 8:50 pm

Eclipse XSD Import Cache

Post by ahundiak »

Does the Eclipse plugin cache imported xsd schemas? And, if so, how do I clear them.

Running Eclipse 3.0.1 under Windows XP with the 5.1.0 plugin.
1. Open an xsd schema file which contains several xs:import elements.
2. Press Validate Document
3. The imported schema files contain errors which are reported.
4. It turns out that the schema files did not have to be imported so delete the import elements and SAVE the original xsd file.
5. Press Validate Document again.
6. The errors from the imported schemas still show up.

I hunted around and could not find any sort of flush command or option. I need to close Eclipse then reopen to make the errors go away. Any alternative would be appreciated.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

You can use the "Clear validation markers" action on the files that contain errors. This is available from the toolbar, from the XSD menu or using the CTRL+Shift+K shortcut.

Best Regards,
George
ahundiak
Posts: 7
Joined: Wed Mar 23, 2005 8:50 pm

Post by ahundiak »

But that probably means opening up each import file. Which is ok but in this scenerio the files were never opened. It's just that the validator insists on rechecking them even after the import statements are removed from the original file.

I sort of think that once the import statements are deleted then the validator should not long try to use them.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

The validator does not recheck those files, but once the error markers are set they can be removed either on request using the clear error markers or if the problems are corrected and a validate action performs with success. You can see this similar with how a Java project works. If you have a class that uses some other class Eclipse will show the errors in the imported class as well and those errors will stay in the Problems View as long as they are present there.

Best Regards,
George
ahundiak
Posts: 7
Joined: Wed Mar 23, 2005 8:50 pm

Post by ahundiak »

Ok. I can live with that. It's a great product by the way. But maybe we need an Eclipse Plugin Forum?
Post Reply