Bug 575022 - Umbrella bug for search/call hierarchy issues
Summary: Umbrella bug for search/call hierarchy issues
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.21   Edit
Hardware: All All
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 552774 562122 572758 549003 549495 550067 553519 565149 565466 565512 565521 566435 571913 572989 573236 574697 576224 576433 576580
Blocks:
  Show dependency tree
 
Reported: 2021-07-25 12:05 EDT by Andrey Loskutov CLA
Modified: 2023-03-17 15:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2021-07-25 12:05:10 EDT
Umbrella bug for known opened Java search / Call Hierarchy issues.
Comment 1 Jörg Kubitz CLA 2021-09-30 09:21:32 EDT
"call hierarchy":
https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=call%20hierarchy&component=Core&product=JDT

47 bugs found.

"search"
https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=search&component=Core&product=JDT

173 bugs found.

Its hard to find a point where to start
Comment 2 Andrey Loskutov CLA 2021-09-30 09:34:06 EDT
(In reply to Jörg Kubitz from comment #1)
> "call hierarchy":
> https://bugs.eclipse.org/bugs/buglist.
> cgi?quicksearch=call%20hierarchy&component=Core&product=JDT
> 
> 47 bugs found.
> 
> "search"
> https://bugs.eclipse.org/bugs/buglist.
> cgi?quicksearch=search&component=Core&product=JDT
> 
> 173 bugs found.
> 
> Its hard to find a point where to start

There are for sure many duplicates, as no one really tracked this :-(

I would propose to start with bug 565512, because the move from "classpath" to "module" hell in Java 9+ broke a lot, and there is already a starting point given (see bug 565512 comment 4). A fix for the root cause of search issues in "module"  based environments will probably cover a lot of other follow up bugs.
Comment 3 Jörg Kubitz CLA 2021-09-30 09:58:53 EDT
(In reply to Andrey Loskutov from comment #2)

> I would propose to start with bug 565512, 

Thats what i thought too. till i made a junit and found that i´the search does not even come that far... calls in .class files seem to be not implemented at all. It looks just random that if the caller has the same method name that a caller is found inside a jar. 
JDT has a big pool of search tests but they all(?) ran only on open projects while there are at least 3 different search implementations for binaries, modular binaries, and non binaries.
Comment 4 Andrey Loskutov CLA 2021-09-30 10:33:05 EDT
(In reply to Jörg Kubitz from comment #3)
> (In reply to Andrey Loskutov from comment #2)
> 
> > I would propose to start with bug 565512, 
> 
> Thats what i thought too. till i made a junit and found that i´the search
> does not even come that far... calls in .class files seem to be not
> implemented at all. It looks just random that if the caller has the same
> method name that a caller is found inside a jar.

I haven't checked the patch, but I assume you are searching for methods/fields.
I would start to search for types - once they can be found, one can check if the underlined symbols can be also found.
Comment 5 Jörg Kubitz CLA 2021-09-30 10:40:08 EDT
(In reply to Andrey Loskutov from comment #4)

> I haven't checked the patch, but I assume you are searching for
> methods/fields.
> I would start to search for types - once they can be found, one can check if
> the underlined symbols can be also found.

we think alike:

I made sure it finds the classes and methods DECLARATIONS. Both the callers and the callees, the implementations and the superclasses. But it does not find IMPLEMENTORS (of types) nor REFERENCES (of methods).
Comment 6 Simeon Andreev CLA 2023-03-17 15:26:47 EDT
From this list, I've moved (to https://github.com/eclipse-jdt/eclipse.jdt.core) what I think we might fix/work on:

https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=call%20hierarchy&list_id=21337922

I didn't move bugs with unclear reproduction and performances issues (for performance issues that Advantest runs into, we'll be opening issues).

If anyone is interested in the remaining issues, please evaluate and move.