Eclipse Ignore Folder

Sometimes when using eclipse I need to jump to a file. I press CTRL-SHFT-R to pop up the resource. However most of the time I end up editing a copy of the file in a build folder.

The solution to this problem is to Right click the troublesome folder, select properties and Click Derived. Now when Jumping to files with CTRL-SHIFT-R  you wont edit the bad copy.

20 thoughts on “Eclipse Ignore Folder”

  1. Thanks very much for this tip. I was looking for exactly this, and it works like a charm.
    Due to the way our build works, there’s 5 copies of most js/jsp files, and the last one is the source file, which has been rather irritating. Your instructions fix that wonderfully.

  2. This is great! Thanks so much.

    Now… is there a way to specify a pattern? I have a whole big code tree of directories and each one has a “.svn” directory to be marked “Derived”, a “generated” directory to be marked “Derived”, etc.

    Digging around in the directories I can’t even find where Eclipse stores this information.

    Thanks!

  3. To get rid of the subversion files, you can go to the menu of the navigator, and select Filters. Then check the checkbox for the types of files/directories you want ignored. Unfortunately there is not one for .svn so I had to choose the .* one. Supposedly you are supposed to be able to edit your plugin.xml file to manually add more filters to choose from, but I could not get this to work.

    Back to the point of the original post, this tip worked great for me for the CTRL-SHFT-R issue. I have a folder of many thousands of images inside my project, and this excludes them from the resource window. Unforunately it doesn’t exclude them from searches! I wish eclipse had a better IGNORE-THIS-FOLDER option. Searching google I come across a lot of people looking for this feature.

  4. Excellent… just what I needed. I found this page searching for a plugin to perform this task and it was built in to eclipse th whole time.

    Thanks.

  5. To remove folders from a search, I reckon you have to create a working set in which you want to search. If this working set does not contain your image folder, they will not appear in the search result.

  6. Hey, nice tip it works a treat.

    I know in Eclipse Ganymede (3.4) on the search page there is an option right under the filename pattern field it is a checkbox for “Consider Derived Resources” which does exactly what it says. So although a year on and you’ve no doubt realised this already, I thought it might be nice to update this post as it was quite handy!

  7. Does anyone know where eclipse stores these ‘derived folders’ preferences? I would like to check them in and share with my development team. However, when I specify several folders as derived, I don’t see any changes to the .project or .classpath config files under that project.

  8. it work fine…but for TARGET folder (maven build) it is not working properly, because sometimes you need to execute command MVN CLEAN and then your derived-settings is gone….

  9. If some .git don’t disappear:
    Properties of the project->Resource->Resource Filters->Add Resource Filter:
    Exclude All
    Folders + All Children (recursive)
    [name] [matches] “.git”

    good luck

Leave a Reply

Your email address will not be published. Required fields are marked *