Ayyoudy
Ayyoudy

Reputation: 3721

Exclude directories & subdirectories from validation in Eclipse

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?

Upvotes: 40

Views: 26086

Answers (4)

yyc1217
yyc1217

Reputation: 69

For those PHP developers who coding in Eclipse Mars.

  1. Right click on folder.
  2. choose "Use As Library Folder"

For example in laravel framwork, you can exclude /vendor, /storage and /node_modules folders from eclipse validation.

Upvotes: 3

Daniel B. Chapman
Daniel B. Chapman

Reputation: 4687

I'm running Helios SR 1 right now so hopefully this works...

  • Select the Project
    • Right Click
    • Properties
    • Validation Menu -> Enable Project Specific Settings
    • Select the validator in question
    • Select/Deselect the validation for build/manual (or, if it something like the web tools you can configure specific rules by plugin--such as excluding a folder)

Hope that helps, it is by tool.

Upvotes: -1

jobesu
jobesu

Reputation: 620

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.

Upvotes: -2

Sarah Haskins
Sarah Haskins

Reputation: 1385

I usually exclude validation in this way, I believe it will be recursive.

  • Right-click on your project and select Properties.
  • Choose Validation from the left-nav menu.
  • If it is not already selected choose "Enable project specific settings".
  • Find the validator that is relevant for what you want to exclude and click the "..." in the Settings column.
  • Highlight the Exclude Group and click Add Rule. (If you don't have any existing exclusions you may have to add an Exclude Group.)
  • Select Folder or file name as the Filter Type.
  • Click Next.
  • Select Browse Folder and find the folder you want to exclude.

Upvotes: 63

Related Questions