Interface IWorkspaceServiceParticipant

All Known Implementing Classes:
WorkspaceIndexPlugin

public interface IWorkspaceServiceParticipant
Workspace Service participant API.
Since:
0.14.2
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    didChangeWatchedFiles(List<org.eclipse.lsp4j.FileEvent> changes, IWatchedFilesContext context)
    Called when watched files are created, changed, or deleted.
    void
    didChangeWorkspaceFolders(org.eclipse.lsp4j.DidChangeWorkspaceFoldersParams params)
    Receive and handle notification about workspace folder changing on client side.
    default org.eclipse.lsp4j.WorkspaceEdit
    willRenameFiles(org.eclipse.lsp4j.RenameFilesParams params, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
    Called before files are renamed.
  • Method Details

    • didChangeWorkspaceFolders

      void didChangeWorkspaceFolders(org.eclipse.lsp4j.DidChangeWorkspaceFoldersParams params)
      Receive and handle notification about workspace folder changing on client side.
      Parameters:
      params - the workspace folders change description
      See Also:
      • WorkspaceService.didChangeWorkspaceFolders(DidChangeWorkspaceFoldersParams)
    • didChangeWatchedFiles

      default void didChangeWatchedFiles(List<org.eclipse.lsp4j.FileEvent> changes, IWatchedFilesContext context)
      Called when watched files are created, changed, or deleted.

      The IWatchedFilesContext lets extensions request a workspace/codeLens/refresh that is sent once — after all participants finish — regardless of how many extensions request it.

      Parameters:
      changes - the list of file events.
      context - context for requesting deferred actions (e.g. code lens refresh).
      See Also:
      • WorkspaceService.didChangeWatchedFiles(DidChangeWatchedFilesParams)
    • willRenameFiles

      default org.eclipse.lsp4j.WorkspaceEdit willRenameFiles(org.eclipse.lsp4j.RenameFilesParams params, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
      Called before files are renamed. Return a WorkspaceEdit with the text changes that should be applied, or null if none.
      Parameters:
      params - the rename parameters (old/new URIs).
      cancelChecker - checker to abort long-running computations.
      Returns:
      a WorkspaceEdit, or null.
      See Also:
      • WorkspaceService.willRenameFiles(RenameFilesParams)