Skip to content

CodeLens lifetime #57227

Closed
Closed

Description

@maziac

Hi,
I'm creating a code lens extension for assembler files.
This is working quite well however I have a problem with the lifetime of the vscode.CodeLens objects.
From what I could see from the API there is no mechanism to update the object. Once it is created in e.g. resolveCodeLens it stays until vscode decides to request it again.

So how to handle the situation that a reference has been added or removed in another file.
I.e. I would like to update the references count in the command title of the code lens.
But there is no trigger for this. E.g. vscode should call resolveCodeLens if other files have changed.

Activity

  1. jrieken commented on Aug 27, 2018

    @jrieken
    Contributor

    You use the onDidChangeCodeLenses-event that your provider can (optionally) offer. See https://github.com/Microsoft/vscode/blob/3f8088b5c5f1d44b5e1af4a8e67448abbe66470e/src/vs/vscode.d.ts#L2163-L2166

  2. vscodebot commented on Aug 27, 2018

    @vscodebot

    We have a great developer community over on slack where extension authors help each other. This is a great place for you to ask questions and find support.

    Happy Coding!

  3. locked and limited conversation to collaborators on Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*dev-questionVS Code Extension Development Question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions