Skip to content

VJSP Features

The plugin provides capabilities such as automatic code completion, code generation, and code editing. You can leverage these features to significantly boost your development efficiency.

Prerequisites

The plugin’s sidebar chat panel must be active.

Code Completion

VJSP Assistant understands your current code context and suggests relevant completions.

Scenario 1: Press Enter to create a new line at the desired location. VJSP Assistant will read and interpret the surrounding code, then automatically suggest the next lines of code.

Scenario 2: Add a comment at the target position, then press Enter. VJSP Assistant will interpret the comment and directly generate the corresponding implementation code.

  • Click the Accept button or press Tab to insert all recommended code.
  • Click Accept Word or use the Ctrl + → shortcut to insert the suggestion word by word.
  • Press Esc to dismiss the recommendation.

Code Generation

VJSP Assistant can generate code snippets based on your natural language description.

  1. Describe your requirement in natural language in the input box.
  2. Click the Send button or press Enter.

VJSP Assistant will then generate the requested code snippet.

Code Editing

VJSP Assistant can edit selected code—supporting refactoring, optimization, logic modification, and more—based on natural language instructions. Follow these steps:

  1. Select the code snippet you want to modify. A lightbulb icon 💡 will appear in the top-left corner of the selection. Click it and choose Add to VJSP AI Code from the “Quick Fix” menu.
  2. In the chat input box, describe your editing request in natural language (e.g., “Optimize the selected code snippet”).
  3. Click Send or press Enter. VJSP Assistant will process your request and generate the revised code immediately.

Unit Test Generation

After selecting a code snippet, send a unit test generation command to VJSP Assistant. It will generate appropriate unit tests for the selected code.

To send the instruction:

  • Type a natural language request in the sidebar chat input (e.g., “Generate unit tests for the selected code snippet”).
  • Click Send or press Enter.

Code Comment Generation

After selecting a code snippet, instruct VJSP Assistant to generate comments for it.

Tip
By default, VJSP Assistant generates function-level comments. You can specify in natural language if you need more detailed inline comments.

To send the instruction:

  • Type a request like “Generate comments for the selected code snippet” in the sidebar chat input.
  • Click Send or press Enter.

Intelligent Q&A

Once the chat panel is open, type your question into the input box and click Send or press Enter. VJSP Assistant will provide an answer. You can engage in multi-turn conversations, adding details iteratively to refine and improve the accuracy of responses.