Class AbstractSaveContext

java.lang.Object
org.eclipse.lemminx.services.extensions.save.AbstractSaveContext
All Implemented Interfaces:
ICodeLensRefresher, IDiagnosticsRefresher, ISaveContext, IXMLDocumentProvider
Direct Known Subclasses:
XMLTextDocumentService.SaveContext

public abstract class AbstractSaveContext extends Object implements ISaveContext
Abstract class for save context.
  • Constructor Details

    • AbstractSaveContext

      public AbstractSaveContext(Object settings)
    • AbstractSaveContext

      public AbstractSaveContext(String uri)
  • Method Details

    • getType

      public ISaveContext.SaveContextType getType()
      Description copied from interface: ISaveContext
      Returns the save context type.
      Specified by:
      getType in interface ISaveContext
      Returns:
      the save context type.
    • getUri

      public String getUri()
      Description copied from interface: ISaveContext
      Returns the document URI which was saved and null if it's a settings which was saved.
      Specified by:
      getUri in interface ISaveContext
      Returns:
      the document URI which was saved and null if it's a settings which was saved.
    • getSettings

      public Object getSettings()
      Description copied from interface: ISaveContext
      Returns the settings which has changed and null otherwise.
      Specified by:
      getSettings in interface ISaveContext
      Returns:
      the settings which has changed and null otherwise.
    • requestCodeLensRefresh

      public void requestCodeLensRefresh()
      Description copied from interface: ICodeLensRefresher
      Requests a workspace/codeLens/refresh to 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.refreshSupport in client capabilities).

      Specified by:
      requestCodeLensRefresh in interface ICodeLensRefresher
    • isCodeLensRefreshRequested

      public boolean isCodeLensRefreshRequested()
      Description copied from interface: ICodeLensRefresher
      Returns true if 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.

      Specified by:
      isCodeLensRefreshRequested in interface ICodeLensRefresher