Skip to content

Unable to prompt types correctly. #4374

@fufu1437

Description

@fufu1437

Describe the bug
Unable to properly prompt any type without preceding context. For example:

import java.io.*;

public class Test {
    public static void main(String argv[]) {
        File f = new File("null");
        // The first 'File' cannot be prompted normally, but the 'File' after 'new' can be prompted correctly.
    }
}

To Reproduce
Steps to reproduce the behavior:
Normal use of extensions

Any project without a build tool (because I prefer to have full control over the compilation process, so I do not use build tools)

Expected behavior
Properly prompt types such as FileNotFoundException.

Screenshots

Image Image

Environment

  • Operating System: ArchLinux

  • JDK version:
    openjdk version "21.0.10" 2026-01-20 LTS
    OpenJDK Runtime Environment Temurin-21.0.10+7 (build 21.0.10+7-LTS)
    OpenJDK 64-Bit Server VM Temurin-21.0.10+7 (build 21.0.10+7-LTS, mixed mode, sharing)

  • Visual Studio Code version: 1.113.0

  • Java extension version: 1.53.0

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions