Skip to content

Add restart IntelliSense command for active file#4380

Open
amritamishra01 wants to merge 2 commits intoredhat-developer:mainfrom
amritamishra01:feat/restart-intellisense-active-file
Open

Add restart IntelliSense command for active file#4380
amritamishra01 wants to merge 2 commits intoredhat-developer:mainfrom
amritamishra01:feat/restart-intellisense-active-file

Conversation

@amritamishra01
Copy link
Copy Markdown
Contributor

Fixes #4293

Summary

This PR adds a new editor context menu action “Restart IntelliSense for Active File” for Java files.

The command appears when right-clicking inside a Java editor and reuses the existing Java language server restart flow to refresh IntelliSense.

Changes

  • Added a new command: java.runtime.restartIntellisense
  • Added command palette contribution in package.json
  • Added editor context menu contribution for Java files
  • Registered the command in src/extension.ts
  • Reused the existing java.server.restart command instead of duplicating restart logic
  • Scoped the action to the active Java editor only

Testing

  • Ran npm run compile successfully

  • Verified command registration in:

    • src/commands.ts
    • src/extension.ts
    • package.json
  • Launched Extension Development Host

  • Opened a .java file

  • Verified the context menu shows Restart IntelliSense for Active File

  • Verified the command reuses the existing restart language server flow

Notes

Since the Java language server operates at the workspace level, this command is exposed only for the active Java editor while internally reusing the existing workspace-level restart behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add “Restart Intellisense for Active File”

1 participant