Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding/Disabling Validation in Eclipse

Tags:

eclipse

I have the (mis)fortune of having a large project source-base in which I am working primarily on PHP and JavaScript. I have to have the full project area as the project root in Eclipse, but unfortunately this includes several directories that drive the validation built into WST/DLTK/etc. nuts.

I have tried disabling all validators in the project properties. I have gone into the validators one at a time and added rules to the "Exclude Group" set to exclude the specific folders. I have removed the folders from the PHP build path in the project properties. And yet, my Problems view/tab is still littered with thousands of red flags that stem mostly from a folder that we use to keep copies of external elements (Apache, PHP, etc.). You know, typical "have a copy of the specific versions we currently use" sort of thing.

The signal-to-noise ratio is so bad that I'm unable to use the view at all, which is a shame. If I'm not going to have the benefits of the IDE, I might as well be using vim for this (I use it for other stuff, but for this codebase a good IDE is a better choice, providing I can get it to work). It seems to me that it would be an obvious feature to be able to right-click a folder in a project and select "Exclude from Validation", but alas there is no such feature. Is there another way to get the validators (PHP, HTML, etc.) to ignore the folders I need ignored?

like image 613
rjray Avatar asked Apr 23 '09 23:04

rjray


People also ask

How do I turn off auto validation in eclipse?

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.

What is validate option in eclipse?

Quoting from Eclipse docs: The workbench includes validators that check certain files in your enterprise application module projects for errors. By default, the workbench validates your files automatically after any build, including automatic builds.


2 Answers

Tried solution;

  1. Right click project
  2. Select properties
  3. Select validation
  4. Check Enable Project specific settings
  5. On the XML Validator row, click the '...' button
  6. Select Exclude Gruop
  7. Click Add rule
  8. Select 'Folder or file name'
  9. Click Next
  10. Select files or folder which are not validated.
  11. Click Finish
  12. Click OK
  13. Click OK

This solved my problem. Because eclipse validation gives error for generated GWT files.

Best regards.

like image 90
Yusuf K. Avatar answered Sep 21 '22 22:09

Yusuf K.


I came upon this question while looking for the same answer. I will list the steps I did here and hopefully it will help someone in the future.

I am using Eclipse 4.1 and I do the following to exclude validation for specific xml files. I am sure if you configure the different validators it will work for other files as well.

Go to Preferences -> Validation Find the Validator you wish to change and select settings (not all of the validators have settings, hopefully yours do).

In the settings you can add an Exclude Group where you can add a rule to specify to exclude the validator for specific extensions, folder or file name, project nature, facet or content type.

like image 24
Wilhelm Kleu Avatar answered Sep 21 '22 22:09

Wilhelm Kleu