Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Bug with SyntaxTree and TextDocument out of sync
posted

Hello,

first:

  • the problem can be reproduced with Infragistics 15.2.20152.1000
  • I attached a sample c# project that should compile after correcting infragistics dll references, with comments and a marked snippet where a breakpoint can be set to directly navigate to the issue

now to the problem:

  • certain TSQL scripts cause a bug to occur when using TextDocument.Language = TSqlLanguage.Instance
  • for those scripts, the SyntaxNode.SyntaxTree.Snapshot.GetText() returns garbage text at some point

The following is such a sample script. Without wrapping the case statement into brackets, or prefixing "name" as "rt.name", the .GetText function returns garbage after the code " and name in". With my breakpoint in the sample you can clearly see, that GetText returns "Y " instead of "BY" in the following nodes, and also the literals '123','456','789' are already split up in a weird way as in the span objects.

Thanks,

cppanda

BugSample.zip
Parents
  • 34510
    Offline posted

    Hi cppanda,

    Thank you for the sample, I was able to reproduce the highlighting issues mentioned.  As such I have logged a development issue so that our developers may investigate this.  The dev issue ID is 221181.  I have also created a private support case for you so that you may track the status of this dev issue.  The case number is CAS-174558-H2W3T6.  You can view the case here.

Reply Children
No Data