Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 5, 2024 22:25
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 5, 2024
public class DataTipInfoGetterTests
public sealed class DataTipInfoGetterTests : AbstractDataTipInfoGetterTests
{
private static async Task TestAsync(string markup, string expectedText = null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to base type to share with VB.

<Trait(Traits.Feature, Traits.Features.DebuggingDataTips)>
Public Class DataTipInfoGetterTests

Private Shared Async Function TestNoDataTipAsync(input As XElement) As Task
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed and replaced with calls to shared base class methods.

var document = context.GetRequiredDocument();

var service = document.GetLanguageService<ILanguageDebugInfoService>();
if (service is null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this ever be null? I think I saw a C#/VB/F# implementation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wasn't certain what our rules were with LSP. like how xaml works there. i wwanted to be a little safe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is exported as ExportCSharpVisualBasicStatelessLspService, so it applies only to the main roslyn server (which supports C#,VB, and F#). It won't be called for anything else

}

internal readonly record struct DebugDataTipInfo(
TextSpan Span, TextSpan ExpressionSpan, string? Text, DebugDataTipInfoKind Kind = DebugDataTipInfoKind.None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TextSpan Span

Have we implemented this such that if the cursor in anywhere in Span, the same expression to evaluate will be produced?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That should be the semantics of 'span'.

@CyrusNajmabadi CyrusNajmabadi merged commit 37d2cbd into dotnet:main Dec 6, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 6, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the lspDataTips branch December 6, 2024 05:04
@dibarbet dibarbet modified the milestones: Next, 17.13 P3 Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants