diff --git a/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs b/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs
index c51a00ff4b19cc6ce835ac6c280d1f14adcbc185..7383a3db5f0c6083c45a3ede914af1dbd56c0063 100644
--- a/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs
+++ b/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs
@@ -356,38 +356,39 @@ private class RegexCommentFormatDefinition : ClassificationFormatDefinition
private RegexCommentFormatDefinition()
{
this.DisplayName = EditorFeaturesWpfResources.Regex_Comment;
- this.ForegroundColor = Color.FromRgb(87, 166, 74);
+ this.ForegroundColor = Color.FromRgb(0, 128, 0);
}
}
+
[Export(typeof(EditorFormatDefinition))]
- [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexText)]
- [Name(ClassificationTypeNames.RegexText)]
+ [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexCharacterClass)]
+ [Name(ClassificationTypeNames.RegexCharacterClass)]
[Order(After = ClassificationTypeNames.StringLiteral)]
[Order(After = ClassificationTypeNames.VerbatimStringLiteral)]
[UserVisible(true)]
[ExcludeFromCodeCoverage]
- private class RegexTextFormatDefinition : ClassificationFormatDefinition
+ private class RegexCharacterClassFormatDefinition : ClassificationFormatDefinition
{
- private RegexTextFormatDefinition()
+ private RegexCharacterClassFormatDefinition()
{
- this.DisplayName = EditorFeaturesWpfResources.Regex_Text;
- this.ForegroundColor = Color.FromRgb(0, 0, 0);
+ this.DisplayName = EditorFeaturesWpfResources.Regex_Character_class;
+ this.ForegroundColor = Color.FromRgb(0x00, 0x73, 0xff);
}
}
[Export(typeof(EditorFormatDefinition))]
- [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexCharacterClass)]
- [Name(ClassificationTypeNames.RegexCharacterClass)]
+ [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexAnchor)]
+ [Name(ClassificationTypeNames.RegexAnchor)]
[Order(After = ClassificationTypeNames.StringLiteral)]
[Order(After = ClassificationTypeNames.VerbatimStringLiteral)]
[UserVisible(true)]
[ExcludeFromCodeCoverage]
- private class RegexCharacterClassFormatDefinition : ClassificationFormatDefinition
+ private class RegexAnchorFormatDefinition : ClassificationFormatDefinition
{
- private RegexCharacterClassFormatDefinition()
+ private RegexAnchorFormatDefinition()
{
- this.DisplayName = EditorFeaturesWpfResources.Regex_Character_class;
- this.ForegroundColor = Color.FromRgb(0x07, 0xbf, 0xb6);
+ this.DisplayName = EditorFeaturesWpfResources.Regex_Anchor;
+ this.ForegroundColor = Color.FromRgb(0xff, 0x00, 0xc1);
}
}
@@ -403,23 +404,23 @@ private class RegexQuantifierFormatDefinition : ClassificationFormatDefinition
private RegexQuantifierFormatDefinition()
{
this.DisplayName = EditorFeaturesWpfResources.Regex_Quantifier;
- this.ForegroundColor = Color.FromRgb(128, 0, 0);
+ this.ForegroundColor = Color.FromRgb(0xff, 0x00, 0xc1);
}
}
[Export(typeof(EditorFormatDefinition))]
- [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexAnchor)]
- [Name(ClassificationTypeNames.RegexAnchor)]
+ [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexGrouping)]
+ [Name(ClassificationTypeNames.RegexGrouping)]
[Order(After = ClassificationTypeNames.StringLiteral)]
[Order(After = ClassificationTypeNames.VerbatimStringLiteral)]
[UserVisible(true)]
[ExcludeFromCodeCoverage]
- private class RegexAnchorFormatDefinition : ClassificationFormatDefinition
+ private class RegexGroupingFormatDefinition : ClassificationFormatDefinition
{
- private RegexAnchorFormatDefinition()
+ private RegexGroupingFormatDefinition()
{
- this.DisplayName = EditorFeaturesWpfResources.Regex_Anchor;
- this.ForegroundColor = Color.FromRgb(128, 0, 0);
+ this.DisplayName = EditorFeaturesWpfResources.Regex_Grouping;
+ this.ForegroundColor = Color.FromRgb(0x05, 0xc3, 0xba);
}
}
@@ -435,39 +436,56 @@ private class RegexAlternationFormatDefinition : ClassificationFormatDefinition
private RegexAlternationFormatDefinition()
{
this.DisplayName = EditorFeaturesWpfResources.Regex_Alternation;
- this.ForegroundColor = Color.FromRgb(0xff, 0x78, 0x00);
+ this.ForegroundColor = Color.FromRgb(0x05, 0xc3, 0xba);
}
}
[Export(typeof(EditorFormatDefinition))]
- [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexGrouping)]
- [Name(ClassificationTypeNames.RegexGrouping)]
+ [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexText)]
+ [Name(ClassificationTypeNames.RegexText)]
[Order(After = ClassificationTypeNames.StringLiteral)]
[Order(After = ClassificationTypeNames.VerbatimStringLiteral)]
[UserVisible(true)]
[ExcludeFromCodeCoverage]
- private class RegexGroupingFormatDefinition : ClassificationFormatDefinition
+ private class RegexTextFormatDefinition : ClassificationFormatDefinition
{
- private RegexGroupingFormatDefinition()
+ private RegexTextFormatDefinition()
{
- this.DisplayName = EditorFeaturesWpfResources.Regex_Grouping;
- this.ForegroundColor = Color.FromRgb(0xff, 0x78, 0x00);
+ this.DisplayName = EditorFeaturesWpfResources.Regex_Text;
+ this.ForegroundColor = Color.FromRgb(0x80, 0x00, 0x00);
}
}
[Export(typeof(EditorFormatDefinition))]
- [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexEscape)]
- [Name(ClassificationTypeNames.RegexEscape)]
+ [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexSelfEscapedCharacter)]
+ [Name(ClassificationTypeNames.RegexSelfEscapedCharacter)]
[Order(After = ClassificationTypeNames.StringLiteral)]
[Order(After = ClassificationTypeNames.VerbatimStringLiteral)]
[UserVisible(true)]
[ExcludeFromCodeCoverage]
- private class RegexEscapeFormatDefinition : ClassificationFormatDefinition
+ private class RegexSelfEscapedCharacterFormatDefinition : ClassificationFormatDefinition
{
- private RegexEscapeFormatDefinition()
+ private RegexSelfEscapedCharacterFormatDefinition()
{
- this.DisplayName = EditorFeaturesWpfResources.Regex_Escape;
- this.ForegroundColor = Color.FromRgb(0x00, 0x73, 0xff);
+ this.DisplayName = EditorFeaturesWpfResources.Regex_SelfEscapedCharacter;
+ this.ForegroundColor = Color.FromRgb(0x80, 0x00, 0x00);
+ this.IsBold = true;
+ }
+ }
+
+ [Export(typeof(EditorFormatDefinition))]
+ [ClassificationType(ClassificationTypeNames = ClassificationTypeNames.RegexOtherEscape)]
+ [Name(ClassificationTypeNames.RegexOtherEscape)]
+ [Order(After = ClassificationTypeNames.StringLiteral)]
+ [Order(After = ClassificationTypeNames.VerbatimStringLiteral)]
+ [UserVisible(true)]
+ [ExcludeFromCodeCoverage]
+ private class RegexOtherEscapeFormatDefinition : ClassificationFormatDefinition
+ {
+ private RegexOtherEscapeFormatDefinition()
+ {
+ this.DisplayName = EditorFeaturesWpfResources.Regex_OtherEscape;
+ this.ForegroundColor = Color.FromRgb(0x9e, 0x5b, 0x71);
}
}
#endregion
diff --git a/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.Designer.cs b/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.Designer.cs
index c568c314e685c903b26c33433aca9368662192d4..56708378e6b523ce0fc700cb5263d3cb30a7c2c2 100644
--- a/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.Designer.cs
+++ b/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.Designer.cs
@@ -124,20 +124,20 @@ internal class EditorFeaturesWpfResources {
}
///
- /// Looks up a localized string similar to Regex - Escape.
+ /// Looks up a localized string similar to Regex - Grouping.
///
- internal static string Regex_Escape {
+ internal static string Regex_Grouping {
get {
- return ResourceManager.GetString("Regex_Escape", resourceCulture);
+ return ResourceManager.GetString("Regex_Grouping", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Regex - Grouping.
+ /// Looks up a localized string similar to Regex - Other Escape.
///
- internal static string Regex_Grouping {
+ internal static string Regex_OtherEscape {
get {
- return ResourceManager.GetString("Regex_Grouping", resourceCulture);
+ return ResourceManager.GetString("Regex_OtherEscape", resourceCulture);
}
}
@@ -150,6 +150,15 @@ internal class EditorFeaturesWpfResources {
}
}
+ ///
+ /// Looks up a localized string similar to Regex - Self Escaped Character.
+ ///
+ internal static string Regex_SelfEscapedCharacter {
+ get {
+ return ResourceManager.GetString("Regex_SelfEscapedCharacter", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Regex - Text.
///
diff --git a/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.resx b/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.resx
index a6b34b776c045d8ae771682f7973cbd4f307fb14..b12e901c4fc2eee5e721407b8c47420f91ff7fe2 100644
--- a/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.resx
+++ b/src/EditorFeatures/Core.Wpf/EditorFeaturesWpfResources.resx
@@ -141,8 +141,8 @@
Regex - Quantifier
-
- Regex - Escape
+
+ Regex - Self Escaped Character
Regex - Grouping
@@ -150,4 +150,7 @@
Regex - Text
+
+ Regex - Other Escape
+
\ No newline at end of file
diff --git a/src/EditorFeatures/Core.Wpf/xlf/EditorFeaturesWpfResources.cs.xlf b/src/EditorFeatures/Core.Wpf/xlf/EditorFeaturesWpfResources.cs.xlf
index dfb30b39a8310b029d2669654e7ea1477f6f08af..7d126270882f3367dfd7270b4660fb0611b216b6 100644
--- a/src/EditorFeatures/Core.Wpf/xlf/EditorFeaturesWpfResources.cs.xlf
+++ b/src/EditorFeatures/Core.Wpf/xlf/EditorFeaturesWpfResources.cs.xlf
@@ -47,16 +47,21 @@
Regex - Text
-
- Regex - Escape
- Regex - Escape
-
-
Regex - Grouping
Regex - Grouping
+
+ Regex - Self Escaped Character
+ Regex - Self Escaped Character
+
+
+
+ Regex - Other Escape
+ Regex - Other Escape
+
+