Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CodeLensProvider<T>

A code lens provider adds commands to source text. The commands will be shown as dedicated horizontal lines in between the source text.

Type parameters

层级

  • CodeLensProvider

索引

Properties(1)

Methods(2)

Properties(1)

Optional onDidChangeCodeLenses

onDidChangeCodeLenses: Event<void>

An optional event to signal that the code lenses from this provider have changed.

Methods(2)

provideCodeLenses

  • Compute a list of lenses. This call should return as fast as possible and if computing the commands is expensive implementors should only return code lens objects with the range set and implement resolve.

    Parameters

    Returns ProviderResult<T[]>

    An array of code lenses or a thenable that resolves to such. The lack of a result can be signaled by returning undefined, null, or an empty array.

Optional resolveCodeLens

  • This function will be called for each visible code lens, usually when scrolling and after calls to compute-lenses.

    Parameters

    • codeLens: T

      Code lens that must be resolved.

    • token: CancellationToken

      A cancellation token.

    Returns ProviderResult<T>

    The given, resolved code lens or thenable that resolves to such.

VS Code 插件开发中文文档 | VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc | 站长统计