Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent Eclipse from flagging file as erroneous

I have a file called "build_properties.xml" in my Java project, which is not a valid XML file, and it is not meant to be. It's included by a build system in another place, so I don't want to touch that file. But it is still a part of the Eclipse project.

By default, Eclipse didn't try to validate that "build_properties.xml" is actually an XML file, but I accidentally clicked on "Validate". Now it marks this file, and the whole project, as having an error, with the little red "X" icon. This makes it difficult to spot actual errors.

I want Eclipse to ignore the XML validation error. I don't want to change the name of the file or its contents. How do I do this?

(I'm using Eclipse IDE for Java EE Developers, build id 20090920-1017.)

like image 354
Antti Kissaniemi Avatar asked Jan 14 '10 13:01

Antti Kissaniemi


People also ask

How do I stop eclipse validation?

Click Window > Preferences and select Validation in the left pane. The Validation page of the Preferences window lists the validators available in your project and their settings. To disable individual validators, clear the check boxes next to each validator that you want to disable.

How do I fix an eclipse error?

From the main menu, select Window > Show view > Other. Then select General > Error Log. The error log is displayed, showing the following information for each error: The status of the error (for example, error or warning)

What is validate option in eclipse?

The Validation Component in the wst sub project provides an extendable framework that is used to develop new custom validators to validate resources in the workbench. The resources can be an eclipse Resource (IResource) or an EMF Resource (EObject).


1 Answers

right click on project > Properties > Validation > XML Validator > Settings (...) and add your xml to the exclusion list

like image 187
Bozho Avatar answered Sep 21 '22 10:09

Bozho