redhat-developer / redhat-developer/vscode-java
Call Hierarchy searches wrong variable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
If multipe variables are declared in one line, Peek>Call Hierachry will look for first Variable decalred in that line
Environment
- Operating System: fedora 36
- JDK version: 17
- Visual Studio Code version: latest
- Java extension version: 1.7.0
Steps To Reproduce
- declare mutiple variables in one line
- right click the second one
- Peek>Call Hierarchy
Test yourself:
public class test {
public static void main(String[] args) {
int x = 1,y=1;
Boolean h = y == 1;
y = 0;
h = x==1;
x = 0
}
}
while looking for Call Hirachy of y x++; is highlighted
y++; -> Highlighted
in my Projekt:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code using the provided Java example with multiple variables declared on one line, then invoke Peek > Call Hierarchy on the second variable. Trace the Call Hierarchy handling for that selection and compare the resolved variable with the highlighted result. Done means selecting y or x resolves and highlights the corresponding variable rather than the first declaration on the line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100