public Task <RangeOrPlaceholderRange> Handle(PrepareRenameParams request, CancellationToken cancellationToken) => Task.Run(() => { var link = GetLink(_languageServer, request.TextDocument.Uri.ToUri(), request.Position); if (link == null) { return(new RangeOrPlaceholderRange(new PlaceholderRange())); } return(new RangeOrPlaceholderRange(new PlaceholderRange() { Range = link.SourceRange, Placeholder = link.Name })); });
// IPrepareRename public async Task <RangeOrPlaceholderRange> Handle(PrepareRenameParams request, CancellationToken cancellationToken) { var link = RenameInfo.GetLink(_languageServer, request.TextDocument.Uri, request.Position); if (link == null) { return(new RangeOrPlaceholderRange(new PlaceholderRange())); } return(new RangeOrPlaceholderRange(new PlaceholderRange() { Range = link.Range.ToLsRange(), Placeholder = link.Name })); }
public override Task<RangeOrPlaceholderRange> Handle(PrepareRenameParams request, CancellationToken cancellationToken) => _handler.Invoke(request, cancellationToken);
public abstract Task<RangeOrPlaceholderRange> Handle(PrepareRenameParams request, CancellationToken cancellationToken);