Reputation: 6041
I've got following structure in Eclipse project
- /src/main/java
- /src/test/java
When I open call hierarchy or using java search, search result contains classes from /src/test/java classes. The same true for type hierarchy and others searches.
There are numbers of unit tests and I don't want to see classes from /src/test/java packages in search result.
The most straightforward way - simply exclude it from build path. Also there are filters for call hierarchy, however I was not able to find them for simple java search. Also filters relies on name pattern, which is not very good though.
I am looking for more convenient way
Upvotes: 6
Views: 2094
Reputation: 3630
Right click on your test folder, go to properties and check the "Derived" checkbox. Then click ok.
Or you can create 2 working sets. 1 set for your code and a second one for your tests. Then when you search, you can search only the working set that holds the code.
Upvotes: 3