Ejemplo n.º 1
0
 /**
  * The result type LocationLink[] got introduced with version 3.14.0
  * and depends on the corresponding client capability textDocument.implementation.linkSupport.
  */
 public override RpcResult GotoImplementation(ImplementationParams args)
 {
     return(RpcResult.Error(new ResponseError
     {
         code = (int)ErrorCodes.RequestFailed,
         message = "Not supported"
     }));
 }
        public async override Task <LocationOrLocationLinks> Handle(ImplementationParams request, CancellationToken token)
        {
            var omnisharpRequest = new FindImplementationsRequest()
            {
                FileName = FromUri(request.TextDocument.Uri),
                Column   = Convert.ToInt32(request.Position.Character),
                Line     = Convert.ToInt32(request.Position.Line)
            };

            var omnisharpResponse = await _findImplementationsHandler.Handle(omnisharpRequest);

            return(omnisharpResponse?.QuickFixes?.Select(x => new LocationOrLocationLink(new Location
            {
                Uri = ToUri(x.FileName),
                Range = ToRange((x.Column, x.Line))
            })).ToArray() ?? Array.Empty <LocationOrLocationLink>());
Ejemplo n.º 3
0
        ILocationContainer IWorker.Implementation(string absFilename, long line, long column)
        {
            var param = new ImplementationParams();

            return(CommonProcessingOfGoto(absFilename, line, column, param, (ITextDocumentPositionParams arg) => client_.Send.TextDocumentImplementation((ImplementationParams)arg)));
        }
 public override Task <LocationOrLocationLinks> Handle(ImplementationParams request, CancellationToken cancellationToken) => _handler.Invoke(request, cancellationToken);
 public abstract Task <LocationOrLocationLinks> Handle(ImplementationParams request, CancellationToken cancellationToken);
Ejemplo n.º 6
0
 public static Task <LocationOrLocations> Implementation(this ILanguageClientDocument mediator, ImplementationParams @params)
 {
     return(mediator.SendRequest <ImplementationParams, LocationOrLocations>(DocumentNames.Implementation, @params));
 }
Ejemplo n.º 7
0
 public abstract RpcResult GotoImplementation(ImplementationParams args);
Ejemplo n.º 8
0
 public static Task <LocationOrLocationLinks> Implementation(this ILanguageClientDocument mediator, ImplementationParams @params, CancellationToken cancellationToken = default)
 {
     return(mediator.SendRequest(@params, cancellationToken));
 }