Skip to content

Code Completion Smartness Improvement #812

Open

Description

@nickzhums

Per survey feedback, I'm creating a mega issue for all code completion smartness improvements.

A few things that customers already ask:

Theme: existing commands from other products

  • - sout / syso : prints System.out.printIn()
  • - soutm: adds the current class and method names
  • - soutp: adds method parameter names and values
  • - soutv: adds the last variable value
  • - Sc -> Scanner

Theme: Provide better revelance when working in specific projects

  • - Java AWT packages missing when working on GUI applications
  • - Anything else that can improve the relevance

Theme: Code-sensitive code completion check

  • - Optimize for different cases of code blocks
  • - Don't display ElementScanner when user just types all lower case letters "else"

Theme: Enum case auto-generation

  • - Generate switch cases for all enum values

Theme: Array

  • - Auto complete code snippet int[n][n] - > new int[n][n]

Theme: Main function

  • - When user types public static void main, it shouldn't generate main function signature twice

Theme: Generic arguments

  • - More intelligent <> completion (such List<> )

Theme: Signature Help Improvement

  • - “When I calling a method, intellisense displays the parameters only ONE time. Basically, it displays the parameters, then as I start putting the values for those parameters, the parameters list disappears”

Activity

  1. nickzhums commented on Nov 19, 2021

    @nickzhums
    MemberAuthor

    adding Sheng Chen (@jdneo) to be the main PoC for this effort

  2. added this to the backlog milestone on Dec 2, 2021
  3. nickzhums commented on Feb 23, 2022

    @nickzhums
    MemberAuthor

    Per our discussion, we could also look at IntelliJ Settings -> Editor -> Live Templates Sheng Chen (@jdneo)

  4. github-actions commented on Oct 31, 2025

    @github-actions

    Hi nickzhums, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    Here are some pointers for the various code-completion enhancements you mentioned:

    • Existing live templates (sout, syso, soutm, Sc) are tracked in “Optimize auto code completion experience for IntelliJ and Eclipse users”:
    – #772

    • Preventing duplicate text on completion (e.g. avoiding double main signatures or overwriting existing tokens) is discussed in:
    – microsoft/vscode-java-debug#1394
    This covers “contextual insert” and could help with your “main function” and code-sensitive completion themes.

    • Smarter method-argument guessing (filling with parameter names when no variables exist) lives under eclipse.jdt.ls’s guessMethodArguments feature:
    – eclipse-jdtls/eclipse.jdt.ls#2512 (comment)

    • For enum-switch-case generation, array-snippet expansions, generic <> completions, and signature-help persistence, there aren’t direct existing issues—consider opening separate feature requests in the vscode-java-pack or vscode-java repo so they can be individually triaged.

    Other references with low confidence

    • Java debug console debounce causing stale completions (debugger only): microsoft/vscode-java-debug#817 (comment)

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions