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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With