Types of code generation
You can use IBM® watsonx Code Assistant™ for Z to generate code suggestions by either using chat conversations, or completing code in the editor. While you can generate an entire code snippet based on natural language prompts, the in-editor code generation allows you to add single-line or multi-line code based on in-line suggestions or using code comments.
When to use chat sessions
Use chat sessions for longer code blocks.
- Generate boilerplate code
- Specify a paragraph/procedure in detail
- Refine the suggested code with more instructions (for example, rename or replace)
When to use in-Editor code completion
Use in-editor code generation for refinement and boilerplate code.
- Complete the line of code that you started to type.
- Automatically create boilerplate code.
- Create paragraphs and code that can be described with a single comment line.