Posted 13 years ago
by Craig
-
Varigence, Inc.
Version: 11.1.0545
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Repro Steps:
1. Open the Actipro Sample Browser
2. Open the C# Editor Sample
3. Add the following text below the Console.WriteLine command:4. Between the last 'b' in Bob and the close quote, type '.' (no quotes)
5. Notice that you get intelliprompt within the quoted string, which is incorrect behavior.
Question:
I've remedied this by using the following code:Is this approach the best way to detect if I'm typing within a string?
Thanks,
-Craig
1. Open the Actipro Sample Browser
2. Open the C# Editor Sample
3. Add the following text below the Console.WriteLine command:
"bob"
5. Notice that you get intelliprompt within the quoted string, which is incorrect behavior.
Question:
I've remedied this by using the following code:
if (e.TypedText == ".")
{
var reader = editor.ActiveView.GetReader();
var token = reader.Token;
if (token != null && token.Id != CSharpTokenId.LiteralString && token.Id != CSharpTokenId.LiteralVerbatimString)
{
// request session
}
}
Thanks,
-Craig