Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How do I exclude folders from Eclipse resources
How do I exclude folders from Eclipse resources [message #242138] Wed, 05 December 2007 03:52 Go to next message
Alex Missing name is currently offline Alex Missing nameFriend
Messages: 12
Registered: July 2009
Junior Member
How can I exclude certain folders from an Eclipse project? For example,
I'd like to exclude the 'target' directory that maven creates from my
eclipse project so that my searches will not search files under that
directory.

Again... this was very intuitive in IntelliJ IDEA under the project src
properties dialog. I can't find any equivalent behavior in Eclipse.

Any help would be greatly appreciated!

Thanks,

Alex
Re: How do I exclude folders from Eclipse resources [message #242149 is a reply to message #242138] Wed, 05 December 2007 06:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ranimg.gmail.com

Hello Alex,

For this you have to create working set.
Select on the reource which you dont wanna perform search operation.
Go to "Search" menu, choose "Text" and you will get a "Select Working set"
window and choose option "No working set" and now Click "New", select
"Resource" and now
choose a resource folder - eg "target" under a project, give a name to the
working set and say finish.

Testing:
Now do a search for a file that is found under "target" and check the
search result. It would not have displayed the searched item thats under
target.
this is because we have selected "No working set".

Now just to verify choose "Selected working set" and test it.

Hope this helps you.

Regards
rani
Re: How do I exclude folders from Eclipse resources [message #242177 is a reply to message #242138] Wed, 05 December 2007 14:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Alex wrote:
> How can I exclude certain folders from an Eclipse project? For example,
> I'd like to exclude the 'target' directory that maven creates from my
> eclipse project so that my searches will not search files under that
> directory.
> Again... this was very intuitive in IntelliJ IDEA under the project src
> properties dialog. I can't find any equivalent behavior in Eclipse.
> Any help would be greatly appreciated!

It's not clear to me what kind of directory the "target" one is, but if
it is part of your source tree you can exclude it in the Java Build Path
section of the project properties (the Source tab). Select the source
location, expand it, and then select the Excluded node and hit the Edit
button.

Hope this helps,
Eric
Re: How do I exclude folders from Eclipse resources [message #242206 is a reply to message #242138] Wed, 05 December 2007 18:00 Go to previous messageGo to next message
Alex Missing name is currently offline Alex Missing nameFriend
Messages: 12
Registered: July 2009
Junior Member
Thanks Rani and Eric for the replies,

The 'target' directory is created by maven at the top level of every
project, adjacent to my 'src' directory. It is visible in the Navigator
view and is included in the search results. Since I have about 50 projects
in this workspace (typically horribly complex project I'm working on!),
I'd like to be able to define what is and what is not a resource of the
project. It isn't included in the Build Path - I don't see any way to
exclude it otherwise.

I think Rani is closer to what I wanted to do - w.r.t. searching. I'd
hoped that I could define the working set for each project (as is the case
in IDEA), to be applied for all cross-referencing and searching. Instead
I've defined a working set for multiple projects that I will use from now
on to search. This is a good improvement on the search results - at least
I don't have to manually filter out repetitions from the target directory.


Thanks,

Alex
Re: How do I exclude folders from Eclipse resources [message #672034 is a reply to message #242206] Thu, 19 May 2011 16:11 Go to previous message
Brian Welter is currently offline Brian WelterFriend
Messages: 1
Registered: May 2011
Junior Member
Create a resource filter!

On the project properties, under resource-->resource filters:

Filter Type: Exclude All
Applies to: Files and folders
All Children (recursive)
File and Folder Attributes:
Name matches target

Now none of the files and folder inside the target directory will be a part of the project.

Previous Topic:How can I add library to Android-Emulator's lib folder
Next Topic:Eclipse for multiple languages
Goto Forum:
  


Current Time: Fri Apr 19 03:14:52 GMT 2024

Powered by FUDForum. Page generated in 0.04425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top