Community
Participate
Working Groups
Created attachment 258711 [details] Test case to reproduce the issue In the given test case, search for references of wrint, the method reference is not highlighted and not shown as well. However, the total references is shown as 2, though. If the lambda is commented, the reference expression is highlighted. From the JDT Core, a SearchMatch is created for this reference expression and the requestor.acceptSearchMatch() is called. As a follow-up of bug 484367 comment 1
Created attachment 258712 [details] Screenshot With Neon M4 build, I see the method reference is highlighted. See attached screenshot.
Let me rephrase it: In Search view, only the lambda is shown and not the reference [yes there is highlighting but no clickable item in search view for method reference]
Created attachment 258714 [details] Search View Only the lambda has a clickable option in Search View
You can click on "test()" or use the search view arrows to navigate to the method reference match. For method reference match [3], NewSearchResultCollector.acceptSearchMatch(SearchMatch match) receives SearchMatch.getElement() as the ResolvedSourceMethod "test()". The same is true for [1] here: public void test(){ new BarImpl().wrint(); // [1] Foo foo1 = (bar)->bar.wrint(); // [2] Foo foo = Bar::wrint; // [3] } Hence, both [1] and [3] are shown with test() node. For [2], SearchMatch.getElement() is the LambdaMethod with parent LambaExpression and hence it is shown in that way in the tree.