5

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?

zhuguowei
  • 8,401
  • 16
  • 70
  • 106
  • This same issue was causing a problem for me. I would open a *Test.java file from the parent option, and the Run As > Junit context menu option didn't exist. When I opened the *Test.java file from the non-parent option eclipse recognized it better and provided the Run As > Junit test menu. – okorng Sep 11 '18 at 13:33

2 Answers2

6

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.

greg-449
  • 109,219
  • 232
  • 102
  • 145
6

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.

pwagner
  • 76
  • 1
  • 4