Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude some project/path in Eclipse Open Resource result list?

Tags:

eclipse

This is a maven project and there is a parent project parent and some child modules, e.g. foo, bar.

<modules>
    <module>foo</module>
    <module>bar</module>
    ...
</modules>

Now in eclipse I want to search a file, e.g. FooService.java, I enter ctrl + shift + R simultaneously, open Open Resource window, but there are many FooService, e.g

parent/foo/src/main/java/com/foo/service/
foo/src/main/java/com/foo/service/

now I want to exclude parent option How to configure it in Eclipse?

like image 924
zhuguowei Avatar asked Dec 09 '15 03:12

zhuguowei


2 Answers

If you click the small down arrow (looks like a triangle) at the top right of the Open Resource dialog you can restrict the search to a particular Working Set.

Clicking 'Select Working Set' will allow you to create a new working set if you do not have a suitable existing Working Set.

like image 181
greg-449 Avatar answered Nov 19 '22 15:11

greg-449


On Eclipse Neon, (on click on the triangle) there is an Option in the Dialog to "Filter Duplicated Resources". This works perfect with the Maven Parent / Module Situation.

like image 21
pwagner Avatar answered Nov 19 '22 13:11

pwagner