Interface ILanguageServerAccess


  • public interface ILanguageServerAccess
    API for interacting with a running language server.
    • Method Detail

      • doRead

        <T> java.util.concurrent.CompletableFuture<T> doRead​(java.lang.String uri,
                                                             java.util.function.Function<ILanguageServerAccess.Context,​T> function)
        Provides read access to a fully resolved resource and document.
      • doReadIndex

        <T> java.util.concurrent.CompletableFuture<T> doReadIndex​(java.util.function.Function<? super ILanguageServerAccess.IndexContext,​? extends T> function)
        Provides read access to the Xtext index.
        Since:
        2.18
      • getLanguageClient

        org.eclipse.lsp4j.services.LanguageClient getLanguageClient()
        Returns:
        the language client facade. It usually also implements Endpoint, which can be used to call non-standard extensions to LSP.
      • newLiveScopeResourceSet

        org.eclipse.emf.ecore.resource.ResourceSet newLiveScopeResourceSet​(org.eclipse.emf.common.util.URI uri)
        Creates a new ResourceSet to be used with the IChangeSerializer API. The IChangeSerializer allows to calculate text edits from model changes. In order not to mess up the originals, the respective models should be loaded into a new resource set which this method provides.
        Parameters:
        uri - a file URI used to detect the project to configure the scope of the resource set.
        Returns:
        a new empty resource set, configured with the project the uri belongs to and the ResourceDescriptionsProvider.LIVE_SCOPE in order to reflect model changes immediately.
        Since:
        2.18
      • getInitializeParams

        org.eclipse.lsp4j.InitializeParams getInitializeParams()
        Returns:
        the parameters as negotiated during client and server on initialization.
        Since:
        2.18
      • getInitializeResult

        org.eclipse.lsp4j.InitializeResult getInitializeResult()
        Returns the InitializeResult of the language server.
        Since:
        2.18