JDT.LS hover shows class name only instead of full method signature#3699
Open
subyssurendran666 wants to merge 2 commits intoeclipse-jdtls:mainfrom
Open
JDT.LS hover shows class name only instead of full method signature#3699subyssurendran666 wants to merge 2 commits intoeclipse-jdtls:mainfrom
subyssurendran666 wants to merge 2 commits intoeclipse-jdtls:mainfrom
Conversation
On mouse hover, Markdown links can display the full constructor or method signature as the anchor text, which provides more context to users Fix: eclipse-jdtls#3690
fbricon
reviewed
Jan 30, 2026
Comment on lines
1153
to
1177
| buf.append("package test;\n" | ||
| + "public class Apple {\n" | ||
| + " /// {@link Ball#xxx}\n" | ||
| + " void foo(){}\n" | ||
| + " /// {@link #newMethodBeingLinkedToo()}\n" | ||
| + " void foo1(){}\n" | ||
| + " /// {@link Ball#abc()}\n" | ||
| + " void voo(){}\n" | ||
| + " /// {@link Ball#Ball}\n" | ||
| + " void voo1(){}\n" | ||
| + " /// {@link Ball#Ball(int x)}\n" | ||
| + " void voo2(){}\n" | ||
| + " /// {@link Ball#Ball(String y)}\n" | ||
| + " void voo3(){}\n" | ||
| + " /// {@link Ball#Ball(String y, int i, Double x)}\n" | ||
| + " void voo4(){}\n" | ||
| + " void newMethodBeingLinkedToo(){}" | ||
| + "}\n" | ||
| + "class Ball {\n" | ||
| + " private String xxx;\n" | ||
| + " Ball(int x){}\n" | ||
| + " Ball(String y){}\n" | ||
| + " void abc(){}\n" | ||
| + "}" | ||
| ); |
Contributor
There was a problem hiding this comment.
please use text block (""")
fbricon
reviewed
Jan 30, 2026
| enum HoverSignatureCase { | ||
| FIELD_REF("Ball.xxx", 3, 9), SELF_METHOD("newMethodBeingLinkedToo()", 5, 9), METHOD_REF("Ball.abc()", 7, 9), CTOR_REF("Ball.Ball", 9, 9), CTOR_X("Ball.Ball(int x)", 11, 9), CTOR_Y("Ball.Ball(String y)", 13, | ||
| 9), CTOR_MANY("Ball.Ball(String y, int i, Double x)", 15, 9); | ||
| FIELD_REF("Ball.xxx", 3, 9), SELF_METHOD("newMethodBeingLinkedToo()", 6, 9), METHOD_REF("Ball.abc()", 9, 9), CTOR_REF("Ball.Ball", 12, 9), CTOR_X("Ball.Ball(int x)", 15, 9), CTOR_Y("Ball.Ball(String y)", 18, |
Contributor
There was a problem hiding this comment.
could you please format the enum values so it's more readable, eg. 1 per line
d4f0dfc to
e464065
Compare
fbricon
requested changes
Jan 30, 2026
Contributor
There was a problem hiding this comment.
Hover fails in this case:
/// See {@link Ball} for more information.
void linkToBall(){}[Error - 3:54:07 PM] Jan 30, 2026, 3:54:07 PM Error computing hover
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at org.eclipse.jdt.ls.core.internal.javadoc.JavadocContentAccess2.collectLinkedTag(JavadocContentAccess2.java:240)
Same error with the following, that HTML Javadoc renders as plain text ("some text"):
/// {@link "some text"}
void method() {}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On mouse hover, Markdown links can display the full constructor or method signature as the anchor text, which provides more context to users
Fix: #3690
Test Snippet