Interface LSPCommand


public interface LSPCommand
Command interface provided by a LSPExtension.
  • Method Summary

    Modifier and Type
    Method
    Description
    execute(LSPServerAccessor server, com.oracle.truffle.api.instrumentation.TruffleInstrument.Env env, List<Object> arguments)
    Execute the command.
    Get the name of the command.
    default int
    Define a timeout for the execution of the command.
    default Object
    onTimeout(List<Object> arguments)
    Fallback behavior in case the command's execution exceeded the timeout.
  • Method Details

    • getName

      String getName()
      Get the name of the command.
    • execute

      Object execute(LSPServerAccessor server, com.oracle.truffle.api.instrumentation.TruffleInstrument.Env env, List<Object> arguments)
      Execute the command.
    • getTimeoutMillis

      default int getTimeoutMillis()
      Define a timeout for the execution of the command.
    • onTimeout

      default Object onTimeout(List<Object> arguments)
      Fallback behavior in case the command's execution exceeded the timeout. Only required if getTimeoutMillis() is overridden and returns a value greater zero.