You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After opening the Kotlin class of the downloaded Maven dependency source code, I see a .class file instead of a .kt file #4297
After opening the Kotlin class of the downloaded Maven dependency source code, I see a .class file instead of a .kt file.
Suppose I have a Kotlin class that references com.facebook.presto.jdbc.internal.okhttp3.OkHttpClient. Now I hover my mouse over the text com.facebook.presto.jdbc.internal.okhttp3.OkHttpClient, hold down the Ctrl key, and left-click.
At this point, I am accessing the OkHttpClient.class file of com.facebook.presto.jdbc.internal.okhttp3.OkHttpClient, not the OkHttpClient.kt file.
So because the class is coming from a jar, the java language server generates a link to the .class in that jar, which is then opened by vscode. At that point, we don't know whether the .class is associated to a source file, java or something else. And then on the client side (vscode) there's a hard-coded mapping from .class to java syntax highlighting. So if the source sent to vscode is kotlin, well, that doesn't look good.
I don't know if it's fixable. In theory, we would need to detect whether the source is attached in the 1st place during , identify which source that is, then compute a URI that both vscode and the language server could handle. But that would need to be done in several place and might be quite slow in certain circumstances.
Activity
fbricon commentedon Jan 8, 2026
So because the class is coming from a jar, the java language server generates a link to the .class in that jar, which is then opened by vscode. At that point, we don't know whether the .class is associated to a source file, java or something else. And then on the client side (vscode) there's a hard-coded mapping from .class to java syntax highlighting. So if the source sent to vscode is kotlin, well, that doesn't look good.
I don't know if it's fixable. In theory, we would need to detect whether the source is attached in the 1st place during , identify which source that is, then compute a URI that both vscode and the language server could handle. But that would need to be done in several place and might be quite slow in certain circumstances.
fbricon commentedon Jan 8, 2026
It was actually super simple to do ;-)
open-proper-source.mp4
Now I need to fix all the unit tests that expected .class
fix 'Goto Super Implementation' test following redhat-developer#4297
fix 'Goto Super Implementation' test following #4297