Skip to content

After opening the Kotlin class of the downloaded Maven dependency source code, I see a .class file instead of a .kt file #4297

@linghengqian

Description

@linghengqian
  • 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.
  • Image
  • At this point, I am accessing the OkHttpClient.class file of com.facebook.presto.jdbc.internal.okhttp3.OkHttpClient, not the OkHttpClient.kt file.
  • Image
  • I'm not entirely sure if this is expected behavior. I personally believe the title of this page should be OkHttpClient.kt instead of OkHttpClient.class, because it displays the content of https://github.com/square/okhttp/blob/ace792f443b2ffb17974f5c0d1cecdf589309f26/okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt , not the decompiled content. My current .vscode/settings.json file contains the following:
{
    "java.compile.nullAnalysis.mode": "automatic",
    "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx8G -Xms100m -Xlog:disable",
    "java.jdt.ls.java.home": "~/.sdkman/candidates/java/25.0.1-graalce",
    "java.configuration.runtimes": [
        {
            "name": "JavaSE-22",
            "path": "~/.sdkman/candidates/java/22.0.2-graalce",
        },
        {
            "name": "JavaSE-24",
            "path": "~/.sdkman/candidates/java/24.0.2-graalce",
            "default": true
        },
        {
            "name": "JavaSE-25",
            "path": "~/.sdkman/candidates/java/25.0.1-graalce",
        },
    ],
}
  • Or am I misunderstanding something? For example, are there any VS Code plugins that specifically parse Kotlin files?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions