Pablo Fernandez
Pablo Fernandez

Reputation: 287390

How do you make NetBeans ignore files when searching for files?

In NetBeans when you go to Navigate -> Go to File you can search for files by filename. Is there a way to instruct NetBeans to ignore some files. It's picking lots of files from a tmp directory in my project which I never intend to open and it's just noise.

Upvotes: 30

Views: 17436

Answers (4)

OldCurmudgeon
OldCurmudgeon

Reputation: 65793

You can also add folders to the "Files ignored by the IDE" configuration.

Select Tools|Options and add the folder names to the regex.

Netbeans: Files ignored by IDE

NB: I have not yet confirmed that this achieves what is described.

Upvotes: 34

Mario Awad
Mario Awad

Reputation: 1439

In NetBeans 7 you go to "Project Properties" then to "Ignored Folders" and you just add your folders there.

Upvotes: 12

eon
eon

Reputation: 31

In my version of Netbeans (6.9.1 on Win 7), there is no button under Project Properties -> Source in which to enter exclusion patterns.

You have to go to Tools -> Options -> Miscellaneous -> Files and add the necessary file names or extensions under "files ignored by the IDE" in the Ignored Files Pattern field regexp.

For ignoring an entire folder, it is (in my version) on the project properties screen, but not under Sources; instead look at the "Ignored Folders" category.

Upvotes: 3

Alistair Sutherland
Alistair Sutherland

Reputation: 1361

You can configure include/exclude file patterns on a project by project basis. This feature will allow you to add an exclude pattern for your 'tmp' directory, which will stop 'Go to File' suggesting files contained in this directory.

To configure bring up the project properties (File -> Project Properties), select sources, and click 'includes/excludes' button. I.e.:

Netbeans Project Properties

Upvotes: 8

Related Questions