redhat-developer / redhat-developer/vscode-java

Test support for Java IntelliSense in Copilot chat code blocks

Offen
#3,684 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@testforstephen arbeitet bereits daran.

Seit 25.6.2024.

Vorherrschende Sprache
TypeScript
Sterne
2.3k
Forks
546
Ø Merge
20 Std. 1 Min.
Gemergte PRs (30 T.)
11

Beschreibung

VS Code recently enabled intellisense in copilot chat code blocks. Although this is mostly implemented in a language agnostic way, language extensions may need to make some changes to get the best support

For this exploration, I'd like your team's help testing out Java IntelliSense in copilot chat code blocks. I've provided a list of ideas on what to test below, however feel free to build on it. I've gone through them for JS/TS and found them to be a good starting point. You can also file feature request against VS Code for new feature ideas

Areas to test

  • The Java extension should see TextDocuments for each chat code block

    These documents will have the schemevscode-chat-code-block

  • Basic syntax language features — such bracket matching and Smart Selection — should always work

  • You should never see errors reported for code in chat code blocks

    Try asking copilot to generate invalid code to confirm this

  • Test hovers and go to definition within a single code block

    For example if you ask for binary search in java, there should be a single code block that has these IntelliSense features

    • Make sure these features work for global symbols
    • Also test IntelliSense for symbols defined within the block
    • Check that any special Java features in hovers (such as links) work as expected
    • Make sure the code block IntelliSense observes any relevant workspace/project settings
  • Test cross code block IntelliSense

    Ask a questions such as binary search in java and follow up by asking write some tests for it. The second code block should use the binary search function defined in the first. Inside of the second code block you should be able to hover on it to see documentation and use go to definition on it

  • Test IntelliSense for workspace symbols

    This feature is mostly handled by copilot but still worth testing. For it, as a @workspace question to find code in the workspace. For example, @workspace where's the code for binary search

    • Make sure can use hover, go to definition, go to implementation, and go to type definition for symbols that come from the workspace
    • Make sure you can still use these features for globals and locals too
  • Make sure that code in code blocks is never picked up as a reference

    If a code block uses a global symbol for example, when you run find all references on that symbol in a normal workspace file, you should not see the use in the code block listed

  • Make sure symbols code blocks never shows up in workspace symbol search

  • Explore any java specific features/behavior of these IntelliSense features inside these chat code blocks

  • Think about if there's any additional IntelliSense features that would help users understand code inside of chat code blocks

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.