DCDExtComponent.implementAll

Implements the interfaces or abstract classes of a specified class/interface. The async implementation is preferred when used in background tasks to prevent disruption of other services as a lot of code is parsed and processed multiple times for this function.

  1. Future!(ImplementedMethod[]) implementAll(const(char)[] code, int position, bool formatCode, string[] formatArgs, bool snippetExtensions)
    class DCDExtComponent
    implementAll
    (
    scope const(char)[] code
    ,,
    bool formatCode = true
    ,
    string[] formatArgs = []
    ,
    bool snippetExtensions = false
    )
  2. ImplementedMethod[] implementAllSync(const(char)[] code, int position, bool formatCode, string[] formatArgs, bool snippetExtensions)

Parameters

code const(char)[]

input file to parse and edit.

position int

position of the superclass or interface to implement after the colon in a class definition.

formatCode bool

automatically calls dfmt on all function bodys when true.

formatArgs string[]

sets the formatter arguments to pass to dfmt if formatCode is true.

snippetExtensions bool

if true, snippets according to the vscode documentation will be inserted in place of method content. See https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets

Return Value

Type: Future!(ImplementedMethod[])

a list of newly implemented methods

Meta