-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement classification for UTF8 String Literals #60265
Implement classification for UTF8 String Literals #60265
Conversation
Is there a desire for these strings to be colored differently than other strings by default? If not, then you could set their BaseDefinitinons to be the String and VerbatimString Classifications (Example). Will need ClassificationFormatDefinitions added to the WPF ClassificationTypeFormatDefinitions. If they are inheriting their foreground color, then no need to set it in the constructor (Example). |
I will let @davidwengier and @CyrusNajmabadi to make the decision here and advise how we should proceed. |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
I don't think we need to colour them differently. We don't colour interpolated or raw strings differently. |
my read of things is teh same as David. Basically, i expect most (if not all) IDE features to basically behave uniformly for the u8 version of a given string literal type. It will almost be as if 'u8' is just an optional suffix we almost always ignore for most features. Only features that have a strong need to actually present things differently to the user are things we can update to do so later. |
@davidwengier, @CyrusNajmabadi Based on this discussion, do I need to make any changes to this PR? Otherwise, it would be good to get a sign-off. |
@@ -27,6 +27,7 @@ public static class ClassificationTypeNames | |||
public const string OperatorOverloaded = "operator - overloaded"; | |||
public const string PreprocessorKeyword = "preprocessor keyword"; | |||
public const string StringLiteral = "string"; | |||
public const string UTF8StringLiteral = "UTF8 string"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would remove thse and just use the existing classification names. e.g. we don't distinguish integer-classification versus double-classification. They're just 'numbers'. So here i think it's fine, absent some really strong user feedback, that we reuse the existing classifications.
@@ -36,6 +37,7 @@ public static class ClassificationTypeNames | |||
public const string PreprocessorText = "preprocessor text"; | |||
public const string Punctuation = "punctuation"; | |||
public const string VerbatimStringLiteral = "string - verbatim"; | |||
public const string UTF8VerbatimStringLiteral = "UTF8 string - verbatim"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove as well.
@RikkiGibson, @dotnet/roslyn-compiler For the second review. |
Test plan #58848