Method Snippets

The following features can be used in DVT to generate new methods:

To customize the way a generated method looks you can edit the method_implementation, method_override_body or method_prototype snippets.

../../_images/vscode_sv_method_snippets.png
../../_images/vscode_sv_method_implementation_snippet.png
${qualifiers}

One or more of local/protected, virtual, static. Can be empty.

${kind}

Either function or task.

${lifetime}

Method variable lifetime, static or automatic. Can be empty.

${return_type}

Function return type. Can be empty.

${identifier}

Method name. Includes class_name:: qualifier for extern method implementations.

${arguments}

List of method arguments. Can be empty.

${body}

The method body. If auto-generated, the method_override_body snippet is used.

${end_keyword}

Either endfunction or endtask.

${unqualified_identifier}

Method name.

../../_images/vscode_sv_method_override_body_snippet.png
../../_images/vscode_sv_method_prototype_snippet.png
${qualifiers}

One or more of local/protected, virtual, static. Can be empty.

${kind}

Either function or task.

${lifetime}

Method variable lifetime, static or automatic. Can be empty.

${return_type}

Function return type. Can be empty.

${identifier}

Method name.

${arguments}

List of method arguments. Can be empty.

Note

When a snippet is auto-generated, you may use either the placeholder (${index:var}) or variable (${var}) format. However, to also take advantage of content assist snippets, the placeholder format is recommended.