Interface ICodeLensRefresher
- All Known Subinterfaces:
ISaveContext,IWatchedFilesContext
- All Known Implementing Classes:
AbstractSaveContext,XMLTextDocumentService.SaveContext
public interface ICodeLensRefresher
Common API for requesting a
workspace/codeLens/refresh to be sent to
the client after a batch event.
Implemented by contexts that process batches of events where multiple extensions may independently decide that code lenses need updating:
ISaveContext— after a document or settings save.IWatchedFilesContext— after aworkspace/didChangeWatchedFilesbatch.
N-to-1 design: Multiple extensions may call
requestCodeLensRefresh() for the same event batch. Only one
workspace/codeLens/refresh is sent to the client once all
participants finish.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturnstrueif any extension has requested a code lens refresh for the current event batch.default voidRequests aworkspace/codeLens/refreshto be sent to the client once all extensions have finished processing the current event batch.
-
Method Details
-
requestCodeLensRefresh
default void requestCodeLensRefresh()Requests aworkspace/codeLens/refreshto be sent to the client once all extensions have finished processing the current event batch.Multiple extensions may call this for the same batch; only one refresh is sent. The refresh is only sent if the client declared support for it (
workspace.codeLens.refreshSupportin client capabilities). -
isCodeLensRefreshRequested
default boolean isCodeLensRefreshRequested()Returnstrueif any extension has requested a code lens refresh for the current event batch.Called by the host service after all participants finish to decide whether to send
workspace/codeLens/refresh.
-