Exclude directories & subdirectories from validation in Eclipse

Viewed 23933

How do I exclude a folder AND its sub-directories from validation in eclipse? I know that you can right click on a folder in Package Explorer and select Exclude Validation, but if you have sub-directories under it, you'd have to this for each and it isn't ideal for generated directories or ones with many sub-folders.

Any plug-ins that might be able to do this?

4 Answers

I think the best way is:

  • Right click the project
  • Properties
  • Java Build Path
  • "Source" tab
  • Select the folder that contains the file you want to exclude
  • Click the button "Edit..."
  • Next button
  • In the "Exclude patterns" Click "Add..." button
  • Add your filter

The filter can be a single file or multiple files.

Related