xmleclipsevalidationpackage-explorer

Eclipse does not show error icon in package explorer if xml file is not well formed


Eclipse doesn't show the error icon in the package explorer for xml files that are not well-formed/not valid (after I have saved the file). Is this an intended behaviour? Can I customize that? I wasn't able to find anything on the preferences. I'm using Eclipse Indigo 3.7.2.

enter image description here

Update: I need to perform "Validate" on the file from context. After this validation has finished, the error icon is also shown in the package explorer. This seems unintuitive.

Thank you!


Solution

  • I've found this tutorial. Apparently, the xml validation process has to be triggered manually from context menu and is not part of the project build process. To change this, open the project settings, navigate to Validation and check Add Validation Builder to project. Once you check it, it will not be shown anymore. Instead, it is part of the build process and can be enabled/disabled as Validation in the project settings in the Builder tab.