diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2016-07-14 12:37:10 +0300 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2016-07-14 12:37:10 +0300 |
commit | 35fa0d707eaad0a62bae999c5d70fc6bf775e72a (patch) | |
tree | 5bde3921cadae7f086b6e070417ec106bc15ffc2 | |
parent | 6ff423428920de8acf1398dba17977df901b5ff8 (diff) |
[Ide] Renamed SyntaxModeService -> SyntaxHighlightingService.
Old SyntaxModes == New SyntaxHighlighting so this is for consistency.
49 files changed, 477 insertions, 477 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs index 537a29de13..1f0992dd79 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs @@ -78,12 +78,12 @@ namespace MonoDevelop.CSharp { this.offset = offset; try { - this.colorStyle = SyntaxModeService.GetEditorTheme (Ide.IdeApp.Preferences.ColorScheme); + this.colorStyle = SyntaxHighlightingService.GetEditorTheme (Ide.IdeApp.Preferences.ColorScheme); if (!this.colorStyle.FitsIdeTheme (Ide.IdeApp.Preferences.UserInterfaceTheme)) - this.colorStyle = SyntaxModeService.GetDefaultColorStyle (Ide.IdeApp.Preferences.UserInterfaceTheme); + this.colorStyle = SyntaxHighlightingService.GetDefaultColorStyle (Ide.IdeApp.Preferences.UserInterfaceTheme); } catch (Exception e) { LoggingService.LogError ("Error while getting the color style : " + Ide.IdeApp.Preferences.ColorScheme + " in ide theme : " + Ide.IdeApp.Preferences.UserInterfaceTheme, e); - this.colorStyle = SyntaxModeService.DefaultColorStyle; + this.colorStyle = SyntaxHighlightingService.DefaultColorStyle; } this.ctx = ctx; if (ctx != null) { @@ -115,7 +115,7 @@ namespace MonoDevelop.CSharp } catch { generatedTypeSyntaxString = typeSyntax != null ? Ambience.EscapeText (typeSyntax.ToString ()) : "?"; } - return highlight ? HighlightSemantically (generatedTypeSyntaxString, SyntaxModeService.GetColor (colorStyle, userTypes)) : generatedTypeSyntaxString; + return highlight ? HighlightSemantically (generatedTypeSyntaxString, SyntaxHighlightingService.GetColor (colorStyle, userTypes)) : generatedTypeSyntaxString; } if (type.TypeKind == TypeKind.Array) { var arrayType = (IArrayTypeSymbol)type; @@ -142,7 +142,7 @@ namespace MonoDevelop.CSharp displayString = type.ToDisplayString (MonoDevelop.Ide.TypeSystem.Ambience.LabelFormat); } var text = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText (displayString); - return highlight ? HighlightSemantically (text, SyntaxModeService.GetColor (colorStyle, userTypes)) : text; + return highlight ? HighlightSemantically (text, SyntaxHighlightingService.GetColor (colorStyle, userTypes)) : text; } // static ICompilation GetCompilation (IType type) @@ -227,7 +227,7 @@ namespace MonoDevelop.CSharp string GetNamespaceMarkup (INamespaceSymbol ns) { var result = new StringBuilder (); - result.Append (Highlight ("namespace ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight ("namespace ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); result.Append (ns.Name); return result.ToString (); @@ -252,23 +252,23 @@ namespace MonoDevelop.CSharp switch (entity.DeclaredAccessibility) { case Accessibility.Internal: if (entity.Kind != SymbolKind.NamedType) - result.Append (Highlight ("internal ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("internal ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.ProtectedAndInternal: - result.Append (Highlight ("protected internal ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("protected internal ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.ProtectedOrInternal: - result.Append (Highlight ("internal protected ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("internal protected ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.Protected: - result.Append (Highlight ("protected ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("protected ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.Private: // private is the default modifier - no need to show that // result.Append (Highlight (" private", SyntaxModeService.GetColor (colorStyle, modifierColor))); break; case Accessibility.Public: - result.Append (Highlight ("public ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("public ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; } var field = entity as IFieldSymbol; @@ -279,16 +279,16 @@ namespace MonoDevelop.CSharp result.Append (Highlight ("fixed ", SyntaxModeService.GetColor (colorStyle, modifierColor))); } else*/ if (field.IsConst) { - result.Append (Highlight ("const ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("const ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } } else if (entity.IsStatic) { - result.Append (Highlight ("static ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("static ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } else if (entity.IsSealed) { if (!(entity is ITypeSymbol && ((ITypeSymbol)entity).TypeKind == TypeKind.Delegate)) - result.Append (Highlight ("sealed ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("sealed ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } else if (entity.IsAbstract) { if (!(entity is ITypeSymbol && ((ITypeSymbol)entity).TypeKind == TypeKind.Interface)) - result.Append (Highlight ("abstract ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("abstract ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } // TODO!!!! @@ -298,20 +298,20 @@ namespace MonoDevelop.CSharp var method = entity as IMethodSymbol; if (method != null) { if (method.IsOverride) { - result.Append (Highlight ("override ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("override ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } else if (method.IsVirtual) { - result.Append (Highlight ("virtual ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("virtual ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } if (method.IsAsync) - result.Append (Highlight ("async ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("async ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); if (method.PartialDefinitionPart != null || method.PartialImplementationPart != null) - result.Append (Highlight ("partial ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("partial ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } if (field != null) { if (field.IsVolatile) - result.Append (Highlight ("volatile ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("volatile ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); if (field.IsReadOnly) - result.Append (Highlight ("readonly ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("readonly ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); } } @@ -320,22 +320,22 @@ namespace MonoDevelop.CSharp { switch (entity.DeclaredAccessibility) { case Accessibility.Internal: - result.Append (Highlight ("internal", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("internal", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.ProtectedAndInternal: - result.Append (Highlight ("protected internal", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("protected internal", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.ProtectedOrInternal: - result.Append (Highlight ("internal protected", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("internal protected", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.Protected: - result.Append (Highlight ("protected", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("protected", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.Private: - result.Append (Highlight ("private", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("private", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case Accessibility.Public: - result.Append (Highlight ("public", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("public", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; } } @@ -379,10 +379,10 @@ namespace MonoDevelop.CSharp if (t == null) throw new ArgumentNullException ("t"); var result = new StringBuilder (); - var highlightedTypeName = Highlight (FilterEntityName (t.Name), SyntaxModeService.GetColor (colorStyle, userTypes)); + var highlightedTypeName = Highlight (FilterEntityName (t.Name), SyntaxHighlightingService.GetColor (colorStyle, userTypes)); result.Append (highlightedTypeName); - var color = AlphaBlend (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Foreground), SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); + var color = AlphaBlend (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Foreground), SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); var colorString = MonoDevelop.Components.HelperMethods.GetColorString (color); result.Append ("<span foreground=\"" + colorString + "\">" + " (type parameter)</span>"); @@ -391,17 +391,17 @@ namespace MonoDevelop.CSharp if (!tp.HasConstructorConstraint && !tp.HasReferenceTypeConstraint && !tp.HasValueTypeConstraint && tp.ConstraintTypes.All (IsObjectOrValueType)) return result.ToString (); result.AppendLine (); - result.Append (Highlight (" where ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight (" where ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); result.Append (highlightedTypeName); result.Append (" : "); int constraints = 0; if (tp.HasReferenceTypeConstraint) { constraints++; - result.Append (Highlight ("class", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.Append (Highlight ("class", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); } else if (tp.HasValueTypeConstraint) { constraints++; - result.Append (Highlight ("struct", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.Append (Highlight ("struct", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); } foreach (var bt in tp.ConstraintTypes) { if (!IsObjectOrValueType (bt)) { @@ -419,7 +419,7 @@ namespace MonoDevelop.CSharp if (tp.HasConstructorConstraint) { if (constraints > 0) result.Append (","); - result.Append (Highlight ("new", SyntaxModeService.GetColor (colorStyle, keywordOperator))); + result.Append (Highlight ("new", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator))); } } @@ -452,7 +452,7 @@ namespace MonoDevelop.CSharp string GetTypeNameWithParameters (ITypeSymbol t) { StringBuilder result = new StringBuilder (); - result.Append (Highlight (FilterEntityName (t.Name), SyntaxModeService.GetColor (colorStyle, userTypes))); + result.Append (Highlight (FilterEntityName (t.Name), SyntaxHighlightingService.GetColor (colorStyle, userTypes))); var namedTypeSymbol = t as INamedTypeSymbol; if (namedTypeSymbol != null) { if (namedTypeSymbol.IsGenericType) { @@ -491,16 +491,16 @@ namespace MonoDevelop.CSharp switch (t.TypeKind) { case TypeKind.Class: - result.Append (Highlight ("class ", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.Append (Highlight ("class ", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); break; case TypeKind.Interface: - result.Append (Highlight ("interface ", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.Append (Highlight ("interface ", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); break; case TypeKind.Struct: - result.Append (Highlight ("struct ", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.Append (Highlight ("struct ", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); break; case TypeKind.Enum: - result.Append (Highlight ("enum ", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.Append (Highlight ("enum ", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); break; } @@ -580,7 +580,7 @@ namespace MonoDevelop.CSharp } } AppendVariance (result, typeParameter.Variance); - result.Append (HighlightSemantically (CSharpAmbience.NetToCSharpTypeName (typeParameter.Name), SyntaxModeService.GetColor (colorStyle, userTypes))); + result.Append (HighlightSemantically (CSharpAmbience.NetToCSharpTypeName (typeParameter.Name), SyntaxHighlightingService.GetColor (colorStyle, userTypes))); i++; } result.Append (">"); @@ -658,7 +658,7 @@ namespace MonoDevelop.CSharp var method = type.GetDelegateInvokeMethod (); AppendModifiers (result, type); - result.Append (Highlight ("delegate ", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.Append (Highlight ("delegate ", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); if (method != null) result.Append (GetTypeReferenceString (method.ReturnType)); if (BreakLineAfterReturnType) { @@ -697,7 +697,7 @@ namespace MonoDevelop.CSharp var result = new StringBuilder (); if (local.IsConst) - result.Append (Highlight ("const ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("const ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); result.Append (GetTypeReferenceString (local.Type)); if (BreakLineAfterReturnType) { @@ -760,7 +760,7 @@ namespace MonoDevelop.CSharp result.Append (" "); } - result.Append (HighlightSemantically (FilterEntityName (field.Name), SyntaxModeService.GetColor (colorStyle, "entity.name.field.source.cs"))); + result.Append (HighlightSemantically (FilterEntityName (field.Name), SyntaxHighlightingService.GetColor (colorStyle, "entity.name.field.source.cs"))); // if (field.IsFixed) { // if (formattingOptions.SpaceBeforeArrayDeclarationBrackets) { @@ -811,14 +811,14 @@ namespace MonoDevelop.CSharp result.Append ("operator "); result.Append (CSharpAmbience.GetOperator (method.Name)); } else { - result.Append (HighlightSemantically (FilterEntityName (method.Name), SyntaxModeService.GetColor (colorStyle, "entity.name.function.source.cs"))); + result.Append (HighlightSemantically (FilterEntityName (method.Name), SyntaxHighlightingService.GetColor (colorStyle, "entity.name.function.source.cs"))); } if (method.TypeArguments.Length > 0) { result.Append ("<"); for (int i = 0; i < method.TypeArguments.Length; i++) { if (i > 0) result.Append (", "); - result.Append (HighlightSemantically (GetTypeReferenceString (method.TypeArguments [i], false), SyntaxModeService.GetColor (colorStyle, userTypes))); + result.Append (HighlightSemantically (GetTypeReferenceString (method.TypeArguments [i], false), SyntaxHighlightingService.GetColor (colorStyle, userTypes))); } result.Append (">"); } else { @@ -853,7 +853,7 @@ namespace MonoDevelop.CSharp result.Append ('('); if (method.ContainingType.TypeKind == TypeKind.Delegate) { - result.Append (Highlight ("delegate", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)) + " ("); + result.Append (Highlight ("delegate", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)) + " ("); AppendParameterList (result, method.ContainingType.GetDelegateInvokeMethod ().Parameters, false /* formattingOptions.SpaceBeforeConstructorDeclarationParameterComma */, false /* formattingOptions.SpaceAfterConstructorDeclarationParameterComma */); @@ -921,9 +921,9 @@ namespace MonoDevelop.CSharp AppendExplicitInterfaces (result, property.ExplicitInterfaceImplementations.Cast<ISymbol> ()); if (property.IsIndexer) { - result.Append (Highlight ("this", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight ("this", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } else { - result.Append (HighlightSemantically (FilterEntityName (property.Name), SyntaxModeService.GetColor (colorStyle, "entity.name.property.source.cs"))); + result.Append (HighlightSemantically (FilterEntityName (property.Name), SyntaxHighlightingService.GetColor (colorStyle, "entity.name.property.source.cs"))); } if (property.Parameters.Length > 0) { @@ -943,7 +943,7 @@ namespace MonoDevelop.CSharp result.Append (" "); AppendAccessibility (result, property.GetMethod); } - result.Append (Highlight (" get", SyntaxModeService.GetColor (colorStyle, keywordOther)) + ";"); + result.Append (Highlight (" get", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + ";"); } if (property.SetMethod != null && IsAccessibleOrHasSourceCode (property.SetMethod)) { @@ -951,7 +951,7 @@ namespace MonoDevelop.CSharp result.Append (" "); AppendAccessibility (result, property.SetMethod); } - result.Append (Highlight (" set", SyntaxModeService.GetColor (colorStyle, keywordOther)) + ";"); + result.Append (Highlight (" set", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + ";"); } result.Append (" }"); @@ -962,7 +962,7 @@ namespace MonoDevelop.CSharp public TooltipInformation GetExternAliasTooltip (ExternAliasDirectiveSyntax externAliasDeclaration, DotNetProject project) { var result = new TooltipInformation (); - result.SignatureMarkup = Highlight ("extern ", SyntaxModeService.GetColor (colorStyle, modifierColor)) + Highlight ("alias ", SyntaxModeService.GetColor (colorStyle, keywordOther)) + externAliasDeclaration.Identifier; + result.SignatureMarkup = Highlight ("extern ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + Highlight ("alias ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + externAliasDeclaration.Identifier; if (project == null) return result; foreach (var r in project.References) { @@ -981,493 +981,493 @@ namespace MonoDevelop.CSharp { var result = new TooltipInformation (); - var color = AlphaBlend (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Foreground), SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); + var color = AlphaBlend (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Foreground), SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); var colorString = MonoDevelop.Components.HelperMethods.GetColorString (color); var keywordSign = "<span foreground=\"" + colorString + "\"> " + GettextCatalog.GetString ("(keyword)") + "</span>"; switch (node.Kind ()) { case SyntaxKind.AbstractKeyword: - result.SignatureMarkup = Highlight ("abstract", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} modifier can be used with classes, methods, properties, indexers, and events.", Highlight ("abstract", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("abstract", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} modifier can be used with classes, methods, properties, indexers, and events.", Highlight ("abstract", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.AddKeyword: - result.SignatureMarkup = Highlight ("add", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} {{ accessor-body }}", Highlight ("add", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define a custom accessor for when an event is subscribed to. If supplied, a remove accessor must also be supplied.", Highlight ("add", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("add", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} {{ accessor-body }}", Highlight ("add", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define a custom accessor for when an event is subscribed to. If supplied, a remove accessor must also be supplied.", Highlight ("add", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.AscendingKeyword: - result.SignatureMarkup = Highlight ("ascending", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} ordering-statement {1}", Highlight ("orderby", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("ascending", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to set the sorting order from smallest to largest in a query expression. This is the default behaviour.", Highlight ("ascending", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("ascending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} ordering-statement {1}", Highlight ("orderby", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("ascending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to set the sorting order from smallest to largest in a query expression. This is the default behaviour.", Highlight ("ascending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.AsyncKeyword: - result.SignatureMarkup = Highlight ("async", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} modifier is used to specify that a class method, anonymous method, or lambda expression is asynchronous.", Highlight ("async", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("async", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} modifier is used to specify that a class method, anonymous method, or lambda expression is asynchronous.", Highlight ("async", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.AsKeyword: - result.SignatureMarkup = Highlight ("as", SyntaxModeService.GetColor (colorStyle, keywordOperator)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("expression {0} type", Highlight ("as", SyntaxModeService.GetColor (colorStyle, keywordOperator)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to perform conversions between compatible types.", Highlight ("as", SyntaxModeService.GetColor (colorStyle, keywordOperator))); + result.SignatureMarkup = Highlight ("as", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("expression {0} type", Highlight ("as", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to perform conversions between compatible types.", Highlight ("as", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator))); break; case SyntaxKind.AwaitKeyword: - result.SignatureMarkup = Highlight ("await", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to specify that an {1} method is to have its execution suspended until the {0} task has completed.", Highlight ("await", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("async", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("await", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to specify that an {1} method is to have its execution suspended until the {0} task has completed.", Highlight ("await", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("async", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.BaseKeyword: - result.SignatureMarkup = Highlight ("base", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to access members of the base class from within a derived class.", Highlight ("base", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("base", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to access members of the base class from within a derived class.", Highlight ("base", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.BreakKeyword: - result.SignatureMarkup = Highlight ("break", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), Highlight ("break", SyntaxModeService.GetColor (colorStyle, keywordOther)) + ";"); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement terminates the closest enclosing loop or switch statement in which it appears.", Highlight ("break", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("break", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), Highlight ("break", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + ";"); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement terminates the closest enclosing loop or switch statement in which it appears.", Highlight ("break", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.CaseKeyword: - result.SignatureMarkup = Highlight ("case", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("case", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} constant-expression:\n statement\n jump-statement", Highlight ("case", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + GettextCatalog.GetString ("{0} constant-expression:\n statement\n jump-statement", Highlight ("case", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); result.SummaryMarkup = ""; break; case SyntaxKind.CatchKeyword: - result.SignatureMarkup = Highlight ("catch", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} try-block\n {1} (exception-declaration-1) catch-block-1\n {1} (exception-declaration-2) catch-block-2\n ...\n{0} try-block {1} catch-block", Highlight ("try", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("catch", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + result.SignatureMarkup = Highlight ("catch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} try-block\n {1} (exception-declaration-1) catch-block-1\n {1} (exception-declaration-2) catch-block-2\n ...\n{0} try-block {1} catch-block", Highlight ("try", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("catch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); result.SummaryMarkup = ""; break; case SyntaxKind.CheckedKeyword: - result.SignatureMarkup = Highlight ("checked", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} block\nor\n{0} (expression)", Highlight ("checked", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to control the overflow-checking context for integral-type arithmetic operations and conversions. It can be used as an operator or a statement.", Highlight ("checked", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("checked", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} block\nor\n{0} (expression)", Highlight ("checked", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to control the overflow-checking context for integral-type arithmetic operations and conversions. It can be used as an operator or a statement.", Highlight ("checked", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ClassKeyword: - result.SignatureMarkup = Highlight ("class", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; + result.SignatureMarkup = Highlight ("class", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; if (node.Parent != null && node.Parent.IsKind (SyntaxKind.ConstructorConstraint)) { - result.SummaryMarkup = GettextCatalog.GetString ("The {0} constraint specifies that the type argument must be a reference type; this applies also to any class, interface, delegate, or array type.", Highlight ("class", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} constraint specifies that the type argument must be a reference type; this applies also to any class, interface, delegate, or array type.", Highlight ("class", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); } else { - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:base-list] {{ class-body }}[;]", Highlight ("class", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)))); - result.SummaryMarkup = GettextCatalog.GetString ("Classes are declared using the keyword {0}.", Highlight ("class", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:base-list] {{ class-body }}[;]", Highlight ("class", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)))); + result.SummaryMarkup = GettextCatalog.GetString ("Classes are declared using the keyword {0}.", Highlight ("class", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); } break; case SyntaxKind.ConstKeyword: - result.SignatureMarkup = Highlight ("const", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} type declarators;", Highlight ("const", SyntaxModeService.GetColor (colorStyle, modifierColor)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to modify a declaration of a field or local variable. It specifies that the value of the field or the local variable cannot be modified.", Highlight ("const", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("const", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} type declarators;", Highlight ("const", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to modify a declaration of a field or local variable. It specifies that the value of the field or the local variable cannot be modified.", Highlight ("const", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.ContinueKeyword: - result.SignatureMarkup = Highlight ("continue", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), Highlight ("continue", SyntaxModeService.GetColor (colorStyle, keywordOther)) + ";"); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement passes control to the next iteration of the enclosing iteration statement in which it appears.", Highlight ("continue", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("continue", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), Highlight ("continue", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + ";"); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement passes control to the next iteration of the enclosing iteration statement in which it appears.", Highlight ("continue", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.DefaultKeyword: - result.SignatureMarkup = Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.SummaryMarkup = ""; if (node.Parent != null) { if (node.Parent is DefaultExpressionSyntax) { result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} (Type)", Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + GettextCatalog.GetString ("{0} (Type)", Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); break; } else if (node.Parent is SwitchStatementSyntax) { result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression) { \n {1} constant-expression:\n statement\n jump-statement\n [{2}:\n statement\n jump-statement]\n}", - Highlight ("switch", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + Highlight ("switch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); break; } } result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (Type)\n\nor\n\n{1} (expression) { \n {2} constant-expression:\n statement\n jump-statement\n [{3}:\n statement\n jump-statement]\n}", - Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("switch", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther))) + Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("switch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))) ); break; case SyntaxKind.DelegateKeyword: - result.SignatureMarkup = Highlight ("delegate", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} result-type identifier ([formal-parameters]);", Highlight ("delegate", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)))); - result.SummaryMarkup = GettextCatalog.GetString ("A {0} declaration defines a reference type that can be used to encapsulate a method with a specific signature.", Highlight ("delegate", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.SignatureMarkup = Highlight ("delegate", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} result-type identifier ([formal-parameters]);", Highlight ("delegate", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)))); + result.SummaryMarkup = GettextCatalog.GetString ("A {0} declaration defines a reference type that can be used to encapsulate a method with a specific signature.", Highlight ("delegate", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); break; case SyntaxKind.IdentifierToken: if (node.ToFullString () == "nameof" && node.Parent?.Parent?.Kind () == SyntaxKind.InvocationExpression) goto case SyntaxKind.NameOfKeyword; if (node.ToFullString () == "dynamic") { - result.SignatureMarkup = Highlight ("dynamic", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} type allows for an object to bypass compile-time type checking and resolve type checking during run-time.", Highlight ("dynamic", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("dynamic", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} type allows for an object to bypass compile-time type checking and resolve type checking during run-time.", Highlight ("dynamic", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } else { return null; } break; case SyntaxKind.DescendingKeyword: - result.SignatureMarkup = Highlight ("descending", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} ordering-statement {1}", Highlight ("orderby", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("descending", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to set the sorting order from largest to smallest in a query expression.", Highlight ("descending", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("descending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} ordering-statement {1}", Highlight ("orderby", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("descending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to set the sorting order from largest to smallest in a query expression.", Highlight ("descending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.DoKeyword: - result.SignatureMarkup = Highlight ("do", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} statement {1} (expression);", Highlight ("do", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("while", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement executes a statement or a block of statements repeatedly until a specified expression evaluates to false.", Highlight ("do", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("do", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} statement {1} (expression);", Highlight ("do", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("while", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement executes a statement or a block of statements repeatedly until a specified expression evaluates to false.", Highlight ("do", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ElseKeyword: - result.SignatureMarkup = Highlight ("else", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression)\n statement1\n [{1}\n statement2]", Highlight ("if", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("else", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + result.SignatureMarkup = Highlight ("else", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression)\n statement1\n [{1}\n statement2]", Highlight ("if", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("else", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); result.SummaryMarkup = ""; break; case SyntaxKind.EnumKeyword: - result.SignatureMarkup = Highlight ("enum", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:base-type] {{ enumerator-list }} [;]", Highlight ("enum", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an enumeration, a distinct type consisting of a set of named constants called the enumerator list.", Highlight ("enum", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.SignatureMarkup = Highlight ("enum", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:base-type] {{ enumerator-list }} [;]", Highlight ("enum", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an enumeration, a distinct type consisting of a set of named constants called the enumerator list.", Highlight ("enum", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); break; case SyntaxKind.EventKeyword: - result.SignatureMarkup = Highlight ("event", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} type declarator;\n[attributes] [modifiers] {0} type member-name {{ accessor-declarations }};", Highlight ("event", SyntaxModeService.GetColor (colorStyle, modifierColor)))); + result.SignatureMarkup = Highlight ("event", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} type declarator;\n[attributes] [modifiers] {0} type member-name {{ accessor-declarations }};", Highlight ("event", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)))); result.SummaryMarkup = GettextCatalog.GetString ("Specifies an event."); break; case SyntaxKind.ExplicitKeyword: - result.SignatureMarkup = Highlight ("explicit", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an explicit user-defined type conversion operator.", Highlight ("explicit", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("explicit", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an explicit user-defined type conversion operator.", Highlight ("explicit", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ExternKeyword: - result.SignatureMarkup = Highlight ("extern", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("Use the {0} modifier in a method declaration to indicate that the method is implemented externally. A common use of the extern modifier is with the DllImport attribute.", Highlight ("extern", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("extern", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("Use the {0} modifier in a method declaration to indicate that the method is implemented externally. A common use of the extern modifier is with the DllImport attribute.", Highlight ("extern", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.FinallyKeyword: - result.SignatureMarkup = Highlight ("finally", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} try-block {1} finally-block",Highlight ("try", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("finally", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} block is useful for cleaning up any resources allocated in the try block. Control is always passed to the finally block regardless of how the try block exits.", Highlight ("finally", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("finally", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} try-block {1} finally-block",Highlight ("try", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("finally", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} block is useful for cleaning up any resources allocated in the try block. Control is always passed to the finally block regardless of how the try block exits.", Highlight ("finally", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.FixedKeyword: - result.SignatureMarkup = Highlight ("fixed", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} ( type* ptr = expr ) statement", Highlight ("fixed", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + result.SignatureMarkup = Highlight ("fixed", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} ( type* ptr = expr ) statement", Highlight ("fixed", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); result.SummaryMarkup = GettextCatalog.GetString ("Prevents relocation of a variable by the garbage collector."); break; case SyntaxKind.ForKeyword: - result.SignatureMarkup = Highlight ("for", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} ([initializers]; [expression]; [iterators]) statement", Highlight ("for", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} loop executes a statement or a block of statements repeatedly until a specified expression evaluates to false.", Highlight ("for", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("for", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} ([initializers]; [expression]; [iterators]) statement", Highlight ("for", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} loop executes a statement or a block of statements repeatedly until a specified expression evaluates to false.", Highlight ("for", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ForEachKeyword: - result.SignatureMarkup = Highlight ("foreach", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("foreach", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} (type identifier {1} expression) statement", Highlight ("foreach", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement repeats a group of embedded statements for each element in an array or an object collection.", Highlight ("foreach", SyntaxModeService.GetColor (colorStyle, keywordOther))); + GettextCatalog.GetString ("{0} (type identifier {1} expression) statement", Highlight ("foreach", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement repeats a group of embedded statements for each element in an array or an object collection.", Highlight ("foreach", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.FromKeyword: - result.SignatureMarkup = Highlight ("from", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} range-variable {1} data-source [query clauses] {2} product-expression", Highlight ("from", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("select", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword marks the beginning of a query expression and defines the data source and local variable to represent the elements in the sequence.", Highlight ("from", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("from", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} range-variable {1} data-source [query clauses] {2} product-expression", Highlight ("from", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("select", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword marks the beginning of a query expression and defines the data source and local variable to represent the elements in the sequence.", Highlight ("from", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.GetKeyword: - result.SignatureMarkup = Highlight ("get", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} [ {{ accessor-body }} ]", Highlight ("get", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define an accessor method to retrieve the value of the property or indexer element.", Highlight ("get", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("get", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} [ {{ accessor-body }} ]", Highlight ("get", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define an accessor method to retrieve the value of the property or indexer element.", Highlight ("get", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.GlobalKeyword: - result.SignatureMarkup = Highlight ("global", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} :: type", Highlight ("global", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to specify a type is within the global namespace.", Highlight ("global", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("global", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} :: type", Highlight ("global", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to specify a type is within the global namespace.", Highlight ("global", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.GotoKeyword: - result.SignatureMarkup = Highlight ("goto", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("goto", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory ( GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} identifier;\n{0} {1} constant-expression;\n {0} {2};", Highlight ("goto", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement transfers the program control directly to a labeled statement. ", Highlight ("goto", SyntaxModeService.GetColor (colorStyle, keywordOther))); + GettextCatalog.GetString ("{0} identifier;\n{0} {1} constant-expression;\n {0} {2};", Highlight ("goto", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement transfers the program control directly to a labeled statement. ", Highlight ("goto", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.GroupKeyword: - result.SignatureMarkup = Highlight ("group", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("group", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Query Form"), - GettextCatalog.GetString ("{0} range-variable {1} key-value\n\nor\n\n{2} range-variable {1} key-value {3} group-name ", Highlight ("group", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("by", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("group", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("into", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword groups elements together from a query which match the key value and stores the result in an {1}. It can also be stored in a group for further use in the query with 'into'.", Highlight ("group", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("IGrouping<TKey, TElement>", SyntaxModeService.GetColor (colorStyle, keywordOther))); + GettextCatalog.GetString ("{0} range-variable {1} key-value\n\nor\n\n{2} range-variable {1} key-value {3} group-name ", Highlight ("group", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("by", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("group", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("into", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword groups elements together from a query which match the key value and stores the result in an {1}. It can also be stored in a group for further use in the query with 'into'.", Highlight ("group", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("IGrouping<TKey, TElement>", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.IfKeyword: - result.SignatureMarkup = Highlight ("if", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("if", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} (expression)\n statement1\n [{1}\n statement2]", Highlight ("if", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("else", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement selects a statement for execution based on the value of a Boolean expression.", Highlight ("if", SyntaxModeService.GetColor (colorStyle, keywordOther))); + GettextCatalog.GetString ("{0} (expression)\n statement1\n [{1}\n statement2]", Highlight ("if", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("else", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement selects a statement for execution based on the value of a Boolean expression.", Highlight ("if", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.IntoKeyword: - result.SignatureMarkup = Highlight ("into", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} range-variable {1} key-value {2} group-name ", Highlight ("group", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("by", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("into", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword stores the result of a group statement for further use in the query.", Highlight ("into", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("into", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} range-variable {1} key-value {2} group-name ", Highlight ("group", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("by", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("into", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword stores the result of a group statement for further use in the query.", Highlight ("into", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ImplicitKeyword: - result.SignatureMarkup = Highlight ("implicit", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an implicit user-defined type conversion operator.", Highlight ("implicit", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("implicit", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an implicit user-defined type conversion operator.", Highlight ("implicit", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.InKeyword: - result.SignatureMarkup = Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; if (node.Parent != null) { if (node.Parent is ForEachStatementSyntax) { result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} (type identifier {1} expression) statement", Highlight ("foreach", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + GettextCatalog.GetString ("{0} (type identifier {1} expression) statement", Highlight ("foreach", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); break; } if (node.Parent is FromClauseSyntax) { result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} range-variable {1} data-source [query clauses] {2} product-expression", Highlight ("from", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("select", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + GettextCatalog.GetString ("{0} range-variable {1} data-source [query clauses] {2} product-expression", Highlight ("from", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("select", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); break; } if (node.Parent is TypeParameterConstraintClauseSyntax) { result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} IMyInterface< {1} T> {}", Highlight ("interface", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)), Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + GettextCatalog.GetString ("{0} IMyInterface< {1} T> {}", Highlight ("interface", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)), Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); break; } } result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (type identifier {1} expression) statement\n\nor\n\n{0} range-variable {1} data-source [query clauses] {2} product-expression\n\nor\n\n{3} IMyInterface<{1} T> {{}}", - Highlight ("foreach", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("select", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("interface", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))) + Highlight ("foreach", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("select", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("interface", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))) ); break; case SyntaxKind.InterfaceKeyword: - result.SignatureMarkup = Highlight ("interface", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:base-list] {{interface-body}}[;]", Highlight ("interface", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)))); + result.SignatureMarkup = Highlight ("interface", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:base-list] {{interface-body}}[;]", Highlight ("interface", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)))); result.SummaryMarkup = GettextCatalog.GetString ("An interface defines a contract. A class or struct that implements an interface must adhere to its contract."); break; case SyntaxKind.InternalKeyword: - result.SignatureMarkup = Highlight ("internal", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is an access modifier for types and type members. Internal members are accessible only within files in the same assembly.", Highlight ("internal", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("internal", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is an access modifier for types and type members. Internal members are accessible only within files in the same assembly.", Highlight ("internal", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.IsKeyword: - result.SignatureMarkup = Highlight ("is", SyntaxModeService.GetColor (colorStyle, keywordOperator)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("expression {0} type", Highlight ("is", SyntaxModeService.GetColor (colorStyle, keywordOperator)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to check whether the run-time type of an object is compatible with a given type.", Highlight ("is", SyntaxModeService.GetColor (colorStyle, keywordOperator))); + result.SignatureMarkup = Highlight ("is", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("expression {0} type", Highlight ("is", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to check whether the run-time type of an object is compatible with a given type.", Highlight ("is", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator))); break; case SyntaxKind.JoinKeyword: - result.SignatureMarkup = Highlight ("join", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("join", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} range-variable2 {1} range2 {2} statement1 {3} statement2 [ {4} group-name ]", - Highlight ("join", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("on", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("equals", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("into", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause produces a new sequence of elements from two source sequences on a given equality condition.", Highlight ("join", SyntaxModeService.GetColor (colorStyle, keywordOther))); + Highlight ("join", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("in", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("on", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("equals", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("into", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause produces a new sequence of elements from two source sequences on a given equality condition.", Highlight ("join", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.LetKeyword: - result.SignatureMarkup = Highlight ("let", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} range-variable = expression", Highlight ("let", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause allows for a sub-expression to have its value stored in a new range variable for use later in the query.", Highlight ("let", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("let", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} range-variable = expression", Highlight ("let", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause allows for a sub-expression to have its value stored in a new range variable for use later in the query.", Highlight ("let", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.LockKeyword: - result.SignatureMarkup = Highlight ("lock", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression) statement_block", Highlight ("lock", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword marks a statement block as a critical section by obtaining the mutual-exclusion lock for a given object, executing a statement, and then releasing the lock.", Highlight ("lock", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("lock", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression) statement_block", Highlight ("lock", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword marks a statement block as a critical section by obtaining the mutual-exclusion lock for a given object, executing a statement, and then releasing the lock.", Highlight ("lock", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.NamespaceKeyword: - result.SignatureMarkup = Highlight ("namespace", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} name[.name1] ...] {{\ntype-declarations\n }}", Highlight ("namespace", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare a scope.", Highlight ("namespace", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("namespace", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} name[.name1] ...] {{\ntype-declarations\n }}", Highlight ("namespace", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare a scope.", Highlight ("namespace", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.NewKeyword: - result.SignatureMarkup = Highlight ("new", SyntaxModeService.GetColor (colorStyle, keywordOperator)) + keywordSign; + result.SignatureMarkup = Highlight ("new", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)) + keywordSign; if (node.Parent != null && node.Parent.IsKind (SyntaxKind.ConstructorConstraint)) { - result.SummaryMarkup = GettextCatalog.GetString ("The {0} constraint specifies that any type argument in a generic class declaration must have a public parameterless constructor. To use the new constraint, the type cannot be abstract.", Highlight ("new", SyntaxModeService.GetColor (colorStyle, keywordOperator))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} constraint specifies that any type argument in a generic class declaration must have a public parameterless constructor. To use the new constraint, the type cannot be abstract.", Highlight ("new", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator))); } else { - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword can be used as an operator or as a modifier. The operator is used to create objects on the heap and invoke constructors. The modifier is used to hide an inherited member from a base class member.", Highlight ("new", SyntaxModeService.GetColor (colorStyle, keywordOperator))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword can be used as an operator or as a modifier. The operator is used to create objects on the heap and invoke constructors. The modifier is used to hide an inherited member from a base class member.", Highlight ("new", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator))); } break; case SyntaxKind.NullKeyword: - result.SignatureMarkup = Highlight ("null", SyntaxModeService.GetColor (colorStyle, keywordConstant)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a literal that represents a null reference, one that does not refer to any object. {0} is the default value of reference-type variables.", Highlight ("null", SyntaxModeService.GetColor (colorStyle, keywordConstant))); + result.SignatureMarkup = Highlight ("null", SyntaxHighlightingService.GetColor (colorStyle, keywordConstant)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a literal that represents a null reference, one that does not refer to any object. {0} is the default value of reference-type variables.", Highlight ("null", SyntaxHighlightingService.GetColor (colorStyle, keywordConstant))); break; case SyntaxKind.OperatorKeyword: - result.SignatureMarkup = Highlight ("operator", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("operator", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} result-type {1} unary-operator ( op-type operand )\n{0} result-type {1} binary-operator (\nop-type operand,\nop-type2 operand2\n )\n{0} {2} {1} conv-type-out ( conv-type-in operand )\n{0} {3} {1} conv-type-out ( conv-type-in operand )", - Highlight ("public static", SyntaxModeService.GetColor (colorStyle, modifierColor)), Highlight ("operator", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("implicit", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("explicit", SyntaxModeService.GetColor (colorStyle, keywordOther))) + Highlight ("public static", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)), Highlight ("operator", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("implicit", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("explicit", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))) ); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an operator in a class or struct declaration.", Highlight ("operator", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to declare an operator in a class or struct declaration.", Highlight ("operator", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.OrderByKeyword: - result.SignatureMarkup = Highlight ("orderby", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("orderby", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Query Form"), - GettextCatalog.GetString ("{0} order-key1 [ {1}|{2}, [order-key2, ...]", Highlight ("orderby", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("ascending", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("descending", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause specifies for the returned sequence to be sorted on a given element in either ascending or descending order.", Highlight ("orderby", SyntaxModeService.GetColor (colorStyle, keywordOther))); + GettextCatalog.GetString ("{0} order-key1 [ {1}|{2}, [order-key2, ...]", Highlight ("orderby", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("ascending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("descending", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause specifies for the returned sequence to be sorted on a given element in either ascending or descending order.", Highlight ("orderby", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.OutKeyword: - result.SignatureMarkup = Highlight ("out", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("out", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; if (node.Parent != null) { if (node.Parent is TypeParameterSyntax) { result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} IMyInterface<{1} T> {}", Highlight ("interface", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)), Highlight ("out", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + GettextCatalog.GetString ("{0} IMyInterface<{1} T> {}", Highlight ("interface", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)), Highlight ("out", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); break; } if (node.Parent is ParameterSyntax) { result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("{0} parameter-name", Highlight ("out", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} method parameter keyword on a method parameter causes a method to refer to the same variable that was passed into the method.", Highlight ("out", SyntaxModeService.GetColor (colorStyle, keywordOther))); + GettextCatalog.GetString ("{0} parameter-name", Highlight ("out", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} method parameter keyword on a method parameter causes a method to refer to the same variable that was passed into the method.", Highlight ("out", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; } } result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} parameter-name\n\nor\n\n{1} IMyInterface<{0} T> {{}}", - Highlight ("out", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("interface", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)))); + Highlight ("out", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("interface", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)))); break; case SyntaxKind.OverrideKeyword: - result.SignatureMarkup = Highlight ("override", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} modifier is used to override a method, a property, an indexer, or an event.", Highlight ("override", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("override", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} modifier is used to override a method, a property, an indexer, or an event.", Highlight ("override", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.ParamKeyword: - result.SignatureMarkup = Highlight ("params", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword lets you specify a method parameter that takes an argument where the number of arguments is variable.", Highlight ("params", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("params", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword lets you specify a method parameter that takes an argument where the number of arguments is variable.", Highlight ("params", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.PartialKeyword: - result.SignatureMarkup = Highlight ("partial", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("partial", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; if (node.Parent != null) { if (node.Parent is TypeDeclarationSyntax) { - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} type-declaration", Highlight ("partial", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword on a type declaration allows for the definition to be split into multiple files.", Highlight ("partial", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} type-declaration", Highlight ("partial", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword on a type declaration allows for the definition to be split into multiple files.", Highlight ("partial", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; } else if (node.Parent is MethodDeclarationSyntax) { - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} method-declaration", Highlight ("partial", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword on a method declaration allows for the implementation of a method to be defined in another part of the partial class.", Highlight ("partial", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} method-declaration", Highlight ("partial", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword on a method declaration allows for the implementation of a method to be defined in another part of the partial class.", Highlight ("partial", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } } else result.AddCategory (GettextCatalog.GetString ("Form"), - GettextCatalog.GetString ("[modifiers] {0} type-declaration\n\nor\n\n{0} method-declaration", Highlight ("partial", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + GettextCatalog.GetString ("[modifiers] {0} type-declaration\n\nor\n\n{0} method-declaration", Highlight ("partial", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); break; case SyntaxKind.PrivateKeyword: - result.SignatureMarkup = Highlight ("private", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a member access modifier. Private access is the least permissive access level. Private members are accessible only within the body of the class or the struct in which they are declared.", Highlight ("private", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("private", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a member access modifier. Private access is the least permissive access level. Private members are accessible only within the body of the class or the struct in which they are declared.", Highlight ("private", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.ProtectedKeyword: - result.SignatureMarkup = Highlight ("protected", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a member access modifier. A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member.", Highlight ("protected", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("protected", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a member access modifier. A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member.", Highlight ("protected", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.PublicKeyword: - result.SignatureMarkup = Highlight ("public", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is an access modifier for types and type members. Public access is the most permissive access level. There are no restrictions on accessing public members.", Highlight ("public", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("public", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is an access modifier for types and type members. Public access is the most permissive access level. There are no restrictions on accessing public members.", Highlight ("public", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.ReadOnlyKeyword: - result.SignatureMarkup = Highlight ("readonly", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a modifier that you can use on fields. When a field declaration includes a {0} modifier, assignments to the fields introduced by the declaration can only occur as part of the declaration or in a constructor in the same class.", Highlight ("readonly", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("readonly", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is a modifier that you can use on fields. When a field declaration includes a {0} modifier, assignments to the fields introduced by the declaration can only occur as part of the declaration or in a constructor in the same class.", Highlight ("readonly", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.RefKeyword: - result.SignatureMarkup = Highlight ("ref", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} method parameter keyword on a method parameter causes a method to refer to the same variable that was passed into the method.", Highlight ("ref ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("ref", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} method parameter keyword on a method parameter causes a method to refer to the same variable that was passed into the method.", Highlight ("ref ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.RemoveKeyword: - result.SignatureMarkup = Highlight ("remove", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} {{ accessor-body }}", Highlight ("remove", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define a custom accessor for when an event is unsubscribed from. If supplied, an add accessor must also be supplied.", Highlight ("remove", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("remove", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} {{ accessor-body }}", Highlight ("remove", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define a custom accessor for when an event is unsubscribed from. If supplied, an add accessor must also be supplied.", Highlight ("remove", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ReturnKeyword: - result.SignatureMarkup = Highlight ("return", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} [expression];", Highlight ("return", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement terminates execution of the method in which it appears and returns control to the calling method.", Highlight ("return ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("return", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} [expression];", Highlight ("return", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement terminates execution of the method in which it appears and returns control to the calling method.", Highlight ("return ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.SelectKeyword: - result.SignatureMarkup = Highlight ("select", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} return-type", Highlight ("select", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause specifies the type of value to return from the query.", Highlight ("select", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("select", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} return-type", Highlight ("select", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause specifies the type of value to return from the query.", Highlight ("select", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.SealedKeyword: - result.SignatureMarkup = Highlight ("sealed", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SignatureMarkup = Highlight ("sealed", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; result.SummaryMarkup = GettextCatalog.GetString ("A sealed class cannot be inherited."); break; case SyntaxKind.SetKeyword: - result.SignatureMarkup = Highlight ("set", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} [ {{ accessor-body }} ]", Highlight ("set", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define an accessor method to assign to the value of the property or indexer element.", Highlight ("set", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("set", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[modifiers] {0} [ {{ accessor-body }} ]", Highlight ("set", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to define an accessor method to assign to the value of the property or indexer element.", Highlight ("set", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.SizeOfKeyword: - result.SignatureMarkup = Highlight ("sizeof", SyntaxModeService.GetColor (colorStyle, keywordOperator)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (type)", Highlight ("sizeof", SyntaxModeService.GetColor (colorStyle, keywordOperator)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to obtain the size in bytes for a value type.", Highlight ("sizeof", SyntaxModeService.GetColor (colorStyle, keywordOperator))); + result.SignatureMarkup = Highlight ("sizeof", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (type)", Highlight ("sizeof", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to obtain the size in bytes for a value type.", Highlight ("sizeof", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator))); break; case SyntaxKind.StackAllocKeyword: - result.SignatureMarkup = Highlight ("stackalloc", SyntaxModeService.GetColor (colorStyle, keywordOperator)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("type * ptr = {0} type [ expr ];", Highlight ("stackalloc", SyntaxModeService.GetColor (colorStyle, keywordOperator)))); + result.SignatureMarkup = Highlight ("stackalloc", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("type * ptr = {0} type [ expr ];", Highlight ("stackalloc", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)))); result.SummaryMarkup = GettextCatalog.GetString ("Allocates a block of memory on the stack."); break; case SyntaxKind.StaticKeyword: - result.SignatureMarkup = Highlight ("static", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("Use the {0} modifier to declare a static member, which belongs to the type itself rather than to a specific object.", Highlight ("static", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("static", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("Use the {0} modifier to declare a static member, which belongs to the type itself rather than to a specific object.", Highlight ("static", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.StructKeyword: - result.SignatureMarkup = Highlight ("struct", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; + result.SignatureMarkup = Highlight ("struct", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; if (node.Parent != null && node.Parent.IsKind (SyntaxKind.ConstructorConstraint)) { - result.SummaryMarkup = GettextCatalog.GetString ("The {0} constraint specifies that the type argument must be a value type. Any value type except Nullable can be specified.", Highlight ("struct", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} constraint specifies that the type argument must be a value type. Any value type except Nullable can be specified.", Highlight ("struct", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); } else { - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:interfaces] body [;]", Highlight ("struct", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)))); - result.SummaryMarkup = GettextCatalog.GetString ("A {0} type is a value type that can contain constructors, constants, fields, methods, properties, indexers, operators, events, and nested types.", Highlight ("struct", SyntaxModeService.GetColor (colorStyle, keywordDeclaration))); + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("[attributes] [modifiers] {0} identifier [:interfaces] body [;]", Highlight ("struct", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)))); + result.SummaryMarkup = GettextCatalog.GetString ("A {0} type is a value type that can contain constructors, constants, fields, methods, properties, indexers, operators, events, and nested types.", Highlight ("struct", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration))); } break; case SyntaxKind.SwitchKeyword: - result.SignatureMarkup = Highlight ("switch", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression)\n {{\n {1} constant-expression:\n statement\n jump-statement\n [{2}:\n statement\n jump-statement]\n }}", Highlight ("switch", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("case ", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement is a control statement that handles multiple selections by passing control to one of the {1} statements within its body.", Highlight ("switch", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("switch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression)\n {{\n {1} constant-expression:\n statement\n jump-statement\n [{2}:\n statement\n jump-statement]\n }}", Highlight ("switch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("case ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement is a control statement that handles multiple selections by passing control to one of the {1} statements within its body.", Highlight ("switch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("case", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ThisKeyword: - result.SignatureMarkup = Highlight ("this", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword refers to the current instance of the class.", Highlight ("this", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("this", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword refers to the current instance of the class.", Highlight ("this", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.ThrowKeyword: - result.SignatureMarkup = Highlight ("throw", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} [expression];", Highlight ("throw", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement is used to signal the occurrence of an anomalous situation (exception) during the program execution.", Highlight ("throw ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("throw", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} [expression];", Highlight ("throw", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement is used to signal the occurrence of an anomalous situation (exception) during the program execution.", Highlight ("throw ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.TryKeyword: - result.SignatureMarkup = Highlight ("try", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("try", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} try-block\n {1} (exception-declaration-1) catch-block-1 \n {1} (exception-declaration-2) catch-block-2 \n...\n{0} try-block {1} catch-block", - Highlight ("try", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("catch", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The try-catch statement consists of a {0} block followed by one or more {1} clauses, which specify handlers for different exceptions.", Highlight ("try", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("catch", SyntaxModeService.GetColor (colorStyle, keywordOther))); + Highlight ("try", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("catch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The try-catch statement consists of a {0} block followed by one or more {1} clauses, which specify handlers for different exceptions.", Highlight ("try", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("catch", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.TypeOfKeyword: - result.SignatureMarkup = Highlight ("typeof", SyntaxModeService.GetColor (colorStyle, keywordOperator)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (type)", Highlight ("typeof", SyntaxModeService.GetColor (colorStyle, keywordOperator)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to obtain the System.Type object for a type.", Highlight ("typeof", SyntaxModeService.GetColor (colorStyle, keywordOperator))); + result.SignatureMarkup = Highlight ("typeof", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (type)", Highlight ("typeof", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} operator is used to obtain the System.Type object for a type.", Highlight ("typeof", SyntaxHighlightingService.GetColor (colorStyle, keywordOperator))); break; case SyntaxKind.UncheckedKeyword: - result.SignatureMarkup = Highlight ("unchecked", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} block\n{0} (expression)", Highlight ("unchecked", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to control the overflow-checking context for integral-type arithmetic operations and conversions.", Highlight ("unchecked", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("unchecked", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} block\n{0} (expression)", Highlight ("unchecked", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to control the overflow-checking context for integral-type arithmetic operations and conversions.", Highlight ("unchecked", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.UnsafeKeyword: - result.SignatureMarkup = Highlight ("unsafe", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword denotes an unsafe context, which is required for any operation involving pointers.", Highlight ("unsafe", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("unsafe", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword denotes an unsafe context, which is required for any operation involving pointers.", Highlight ("unsafe", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.UsingKeyword: - result.SignatureMarkup = Highlight ("using", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression | type identifier = initializer) statement\n{0} [alias = ]class_or_namespace;", Highlight ("using", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} directive creates an alias for a namespace or imports types defined in other namespaces. The {0} statement defines a scope at the end of which an object will be disposed.", Highlight ("using", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("using", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression | type identifier = initializer) statement\n{0} [alias = ]class_or_namespace;", Highlight ("using", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} directive creates an alias for a namespace or imports types defined in other namespaces. The {0} statement defines a scope at the end of which an object will be disposed.", Highlight ("using", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.VirtualKeyword: - result.SignatureMarkup = Highlight ("virtual", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class.", Highlight ("virtual", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("virtual", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class.", Highlight ("virtual", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.VolatileKeyword: - result.SignatureMarkup = Highlight ("volatile", SyntaxModeService.GetColor (colorStyle, modifierColor)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} declaration", Highlight ("volatile", SyntaxModeService.GetColor (colorStyle, modifierColor)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword indicates that a field can be modified in the program by something such as the operating system, the hardware, or a concurrently executing thread.", Highlight ("volatile", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.SignatureMarkup = Highlight ("volatile", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} declaration", Highlight ("volatile", SyntaxHighlightingService.GetColor (colorStyle, modifierColor)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword indicates that a field can be modified in the program by something such as the operating system, the hardware, or a concurrently executing thread.", Highlight ("volatile", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); break; case SyntaxKind.VoidKeyword: - result.SignatureMarkup = Highlight ("void", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("void", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; break; case SyntaxKind.WhereKeyword: - result.SignatureMarkup = Highlight ("where", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight ("where", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; if (node.Parent != null) { if (node.Parent is WhereClauseSyntax) { - result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} condition", Highlight ("where", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause specifies which elements from the data source to be returned according to a given condition.", Highlight ("where", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.AddCategory (GettextCatalog.GetString ("Query Form"), GettextCatalog.GetString ("{0} condition", Highlight ("where", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause specifies which elements from the data source to be returned according to a given condition.", Highlight ("where", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; } if (node.Parent is TypeConstraintSyntax) { - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("generic-class-declaration {0} type-parameter : type-constraint", Highlight ("where", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause constrains which types can be used as the type parameter in a generic declaration.", Highlight ("where", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("generic-class-declaration {0} type-parameter : type-constraint", Highlight ("where", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} clause constrains which types can be used as the type parameter in a generic declaration.", Highlight ("where", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; } } else { - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("generic-class-declaration {0} type-parameter : type-constraint\n\nor\n\nquery-clauses {0} condition [query-clauses]", Highlight ("where", SyntaxModeService.GetColor (colorStyle, keywordOther)))); + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("generic-class-declaration {0} type-parameter : type-constraint\n\nor\n\nquery-clauses {0} condition [query-clauses]", Highlight ("where", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); } break; case SyntaxKind.YieldKeyword: - result.SignatureMarkup = Highlight ("yield", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} {1}\n\nor\n\n{0} {2} expression", Highlight ("yield", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("break", SyntaxModeService.GetColor (colorStyle, keywordOther)), Highlight ("return", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to indicate that a method, get accessor, or operator is an iterator.", Highlight ("yield", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("yield", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} {1}\n\nor\n\n{0} {2} expression", Highlight ("yield", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("break", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)), Highlight ("return", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} keyword is used to indicate that a method, get accessor, or operator is an iterator.", Highlight ("yield", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.WhileKeyword: - result.SignatureMarkup = Highlight ("while", SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression) statement", Highlight ("while", SyntaxModeService.GetColor (colorStyle, keywordOther)))); - result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement executes a statement or a block of statements until a specified expression evaluates to false.", Highlight ("while", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.SignatureMarkup = Highlight ("while", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0} (expression) statement", Highlight ("while", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)))); + result.SummaryMarkup = GettextCatalog.GetString ("The {0} statement executes a statement or a block of statements until a specified expression evaluates to false.", Highlight ("while", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); break; case SyntaxKind.NameOfKeyword: - result.SignatureMarkup = Highlight ("nameof", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; - result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0}(identifier)", Highlight ("nameof", SyntaxModeService.GetColor (colorStyle, keywordDeclaration)))); + result.SignatureMarkup = Highlight ("nameof", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)) + keywordSign; + result.AddCategory (GettextCatalog.GetString ("Form"), GettextCatalog.GetString ("{0}(identifier)", Highlight ("nameof", SyntaxHighlightingService.GetColor (colorStyle, keywordDeclaration)))); result.SummaryMarkup = GettextCatalog.GetString ("Used to obtain the simple (unqualified) string name of a variable, type, or member."); break; default: @@ -1480,12 +1480,12 @@ namespace MonoDevelop.CSharp { var result = new TooltipInformation (); - var color = AlphaBlend (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Foreground), SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); + var color = AlphaBlend (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Foreground), SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); var colorString = MonoDevelop.Components.HelperMethods.GetColorString (color); var keywordSign = "<span foreground=\"" + colorString + "\"> " + GettextCatalog.GetString ("(keyword)") + "</span>"; - result.SignatureMarkup = Highlight (keyword.ToFullString (), SyntaxModeService.GetColor (colorStyle, keywordOther)) + keywordSign; + result.SignatureMarkup = Highlight (keyword.ToFullString (), SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + keywordSign; switch (keyword.Parent.Kind ()) { case SyntaxKind.ClassConstraint: @@ -1535,7 +1535,7 @@ namespace MonoDevelop.CSharp throw new ArgumentNullException ("evt"); var result = new StringBuilder (); AppendModifiers (result, evt); - result.Append (Highlight ("event ", SyntaxModeService.GetColor (colorStyle, modifierColor))); + result.Append (Highlight ("event ", SyntaxHighlightingService.GetColor (colorStyle, modifierColor))); result.Append (GetTypeReferenceString (evt.Type)); if (BreakLineAfterReturnType) { result.AppendLine (); @@ -1544,7 +1544,7 @@ namespace MonoDevelop.CSharp } AppendExplicitInterfaces (result, evt.ExplicitInterfaceImplementations.Cast<ISymbol> ()); - result.Append (HighlightSemantically (FilterEntityName (evt.Name), SyntaxModeService.GetColor (colorStyle, "entity.name.event.source.cs"))); + result.Append (HighlightSemantically (FilterEntityName (evt.Name), SyntaxHighlightingService.GetColor (colorStyle, "entity.name.event.source.cs"))); return result.ToString (); } @@ -1617,11 +1617,11 @@ namespace MonoDevelop.CSharp if (parameter == null) return; if (parameter.RefKind == RefKind.Out) { - result.Append (Highlight ("out ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight ("out ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } else if (parameter.RefKind == RefKind.Ref) { - result.Append (Highlight ("ref ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight ("ref ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } else if (parameter.IsParams) { - result.Append (Highlight ("params ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight ("params ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } result.Append (GetTypeReferenceString (parameter.Type)); result.Append (" "); @@ -1652,24 +1652,24 @@ namespace MonoDevelop.CSharp { if (constantValue is string) { - sb.Append (Highlight ("\"" + MonoDevelop.Ide.TypeSystem.Ambience.EscapeText ((string)constantValue) + "\"", SyntaxModeService.GetColor (colorStyle, stringConstants))); + sb.Append (Highlight ("\"" + MonoDevelop.Ide.TypeSystem.Ambience.EscapeText ((string)constantValue) + "\"", SyntaxHighlightingService.GetColor (colorStyle, stringConstants))); return; } if (constantValue is char) { - sb.Append (Highlight ("'" + constantValue + "'", SyntaxModeService.GetColor (colorStyle, stringConstants))); + sb.Append (Highlight ("'" + constantValue + "'", SyntaxHighlightingService.GetColor (colorStyle, stringConstants))); return; } if (constantValue is bool) { - sb.Append (Highlight ((bool)constantValue ? "true" : "false", SyntaxModeService.GetColor (colorStyle, keywordConstant))); + sb.Append (Highlight ((bool)constantValue ? "true" : "false", SyntaxHighlightingService.GetColor (colorStyle, keywordConstant))); return; } if (constantValue == null) { if (constantType.IsValueType) { // structs can never be == null, therefore it's the default value. - sb.Append (Highlight ("default", SyntaxModeService.GetColor (colorStyle, keywordOther)) + "(" + GetTypeReferenceString (constantType) + ")"); + sb.Append (Highlight ("default", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + "(" + GetTypeReferenceString (constantType) + ")"); } else { - sb.Append (Highlight ("null", SyntaxModeService.GetColor (colorStyle, keywordConstant))); + sb.Append (Highlight ("null", SyntaxHighlightingService.GetColor (colorStyle, keywordConstant))); } return; } @@ -1680,7 +1680,7 @@ namespace MonoDevelop.CSharp foreach (var field in constantType.GetMembers ().OfType<IFieldSymbol> ()) { if (field.ConstantValue == constantValue) { if (useNumericalEnumValue) { - sb.Append (Highlight (string.Format ("0x{0:X}", field.ConstantValue), SyntaxModeService.GetColor (colorStyle, numericConstants))); + sb.Append (Highlight (string.Format ("0x{0:X}", field.ConstantValue), SyntaxHighlightingService.GetColor (colorStyle, numericConstants))); } else { sb.Append (GetTypeReferenceString (constantType) + "." + FilterEntityName (field.Name)); } @@ -1713,18 +1713,18 @@ namespace MonoDevelop.CSharp } } - sb.Append ("(" + GetTypeReferenceString (constantType) + ")" + Highlight (constantValue.ToString (), SyntaxModeService.GetColor (colorStyle, numericConstants))); + sb.Append ("(" + GetTypeReferenceString (constantType) + ")" + Highlight (constantValue.ToString (), SyntaxHighlightingService.GetColor (colorStyle, numericConstants))); return; } - sb.Append (Highlight (MonoDevelop.Ide.TypeSystem.Ambience.EscapeText (constantValue.ToString ()), SyntaxModeService.GetColor (colorStyle, numericConstants))); + sb.Append (Highlight (MonoDevelop.Ide.TypeSystem.Ambience.EscapeText (constantValue.ToString ()), SyntaxHighlightingService.GetColor (colorStyle, numericConstants))); } void AppendVariance (StringBuilder sb, VarianceKind variance) { if (variance == VarianceKind.In) { - sb.Append (Highlight ("in ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + sb.Append (Highlight ("in ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } else if (variance == VarianceKind.Out) { - sb.Append (Highlight ("out ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + sb.Append (Highlight ("out ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); } } @@ -1758,7 +1758,7 @@ namespace MonoDevelop.CSharp } else { result.Append (" "); } - result.Append (Highlight ("this", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight ("this", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); result.Append ("["); for (int i = 0; i < arrayType.Rank; i++) { if (i > 0) @@ -1767,7 +1767,7 @@ namespace MonoDevelop.CSharp if (doHighightParameter) result.Append ("<u>"); - result.Append (Highlight ("int ", SyntaxModeService.GetColor (colorStyle, keywordOther))); + result.Append (Highlight ("int ", SyntaxHighlightingService.GetColor (colorStyle, keywordOther))); result.Append (arrayType.Rank == 1 ? "index" : "i" + (i + 1)); if (doHighightParameter) result.Append ("</u>"); @@ -1775,8 +1775,8 @@ namespace MonoDevelop.CSharp result.Append ("]"); result.Append (" {"); - result.Append (Highlight (" get", SyntaxModeService.GetColor (colorStyle, keywordOther)) + ";"); - result.Append (Highlight (" set", SyntaxModeService.GetColor (colorStyle, keywordOther)) + ";"); + result.Append (Highlight (" get", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + ";"); + result.Append (Highlight (" set", SyntaxHighlightingService.GetColor (colorStyle, keywordOther)) + ";"); result.Append (" }"); return result.ToString (); @@ -1786,7 +1786,7 @@ namespace MonoDevelop.CSharp string Highlight (string str, HslColor color) { if (grayOut) { - color = AlphaBlend ((Gdk.Color)color, (Gdk.Color)SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); + color = AlphaBlend ((Gdk.Color)color, (Gdk.Color)SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Background), optionalAlpha); } var colorString = MonoDevelop.Components.HelperMethods.GetColorString (color); diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs index ed1fbd04f6..724373fe62 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs @@ -106,7 +106,7 @@ namespace MonoDevelop.Debugger var label = new Label (GettextCatalog.GetString ("{0} not found. Find source file at alternative location.", Path.GetFileName (sf.SourceLocation.FileName))); hbox.TooltipText = sf.SourceLocation.FileName; - var color = SyntaxModeService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.NotificationText); + var color = SyntaxHighlightingService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.NotificationText); label.ModifyFg (StateType.Normal, color); int w, h; diff --git a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/MonoDevelopHexEditorStyle.cs b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/MonoDevelopHexEditorStyle.cs index db9a3f60ad..879d24c676 100644 --- a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/MonoDevelopHexEditorStyle.cs +++ b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/MonoDevelopHexEditorStyle.cs @@ -57,7 +57,7 @@ namespace MonoDevelop.HexEditor void SetStyle () { - colorStyle = SyntaxModeService.GetEditorTheme (IdeApp.Preferences.ColorScheme); + colorStyle = SyntaxHighlightingService.GetEditorTheme (IdeApp.Preferences.ColorScheme); } Color ConvertColor (Cairo.Color foreground) @@ -72,13 +72,13 @@ namespace MonoDevelop.HexEditor public override Color HexOffset { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.LineNumbers)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.LineNumbers)); } } public override Color HexOffsetBg { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.LineNumbersBackground)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.LineNumbersBackground)); } } @@ -90,67 +90,67 @@ namespace MonoDevelop.HexEditor public override Color HexDigit { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Foreground)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Foreground)); } } public override Color HexDigitBg { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Background)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Background)); } } public override Color DashedLineFg { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Foreground)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Foreground)); } } public override Color DashedLineBg { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Background)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Background)); } } public override Color IconBarBg { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.IndicatorMarginSeparator)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.IndicatorMarginSeparator)); } } public override Color IconBarSeperator { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.IndicatorMarginSeparator)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.IndicatorMarginSeparator)); } } public override Color BookmarkColor1 { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.MessageBubbleWarningLine)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.MessageBubbleWarningLine)); } } public override Color BookmarkColor2 { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.MessageBubbleWarningLine2)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.MessageBubbleWarningLine2)); } } public override Color Selection { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Foreground)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Foreground)); } } public override Color SelectionBg { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.Selection)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.Selection)); } } public override Color HighlightOffset { get { - return ConvertColor (SyntaxModeService.GetColor (colorStyle, ThemeSettingColors.FindHighlight)); + return ConvertColor (SyntaxHighlightingService.GetColor (colorStyle, ThemeSettingColors.FindHighlight)); } } } diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs index 7f1fd850d5..bebd46bdc8 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs @@ -208,13 +208,13 @@ namespace MonoDevelop.AnalysisCore.Gui { switch (result.Level) { case DiagnosticSeverity.Hidden: - return SyntaxModeService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.Background); + return SyntaxHighlightingService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.Background); case DiagnosticSeverity.Error: - return SyntaxModeService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.UnderlineError); + return SyntaxHighlightingService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.UnderlineError); case DiagnosticSeverity.Warning: - return SyntaxModeService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.UnderlineWarning); + return SyntaxHighlightingService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.UnderlineWarning); case DiagnosticSeverity.Info: - return SyntaxModeService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.UnderlineSuggestion); + return SyntaxHighlightingService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.UnderlineSuggestion); default: throw new System.ArgumentOutOfRangeException (); } diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringPreviewTooltipWindow.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringPreviewTooltipWindow.cs index fa7a80eed4..d0fa9c3dc5 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringPreviewTooltipWindow.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringPreviewTooltipWindow.cs @@ -216,7 +216,7 @@ namespace MonoDevelop.Refactoring var style = editor.Options.GetEditorTheme (); g.Rectangle (0, 0, Allocation.Width, Allocation.Height); - g.SetSourceColor (SyntaxModeService.GetColor (style, ThemeSettingColors.Background)); + g.SetSourceColor (SyntaxHighlightingService.GetColor (style, ThemeSettingColors.Background)); g.Fill (); int y = verticalTextSpace / 2; @@ -263,17 +263,17 @@ namespace MonoDevelop.Refactoring for (int i = item.RemoveStart; i < item.RemoveStart + item.Removed; i++) { g.Rectangle (0, y, Allocation.Width, lineHeight); - g.SetSourceColor (SyntaxModeService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffRemovedBackground)); + g.SetSourceColor (SyntaxHighlightingService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffRemovedBackground)); g.Fill (); - g.SetSourceColor (SyntaxModeService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffRemoved)); + g.SetSourceColor (SyntaxHighlightingService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffRemoved)); DrawTextLine (g, editor, i, ref y); } for (int i = item.InsertStart; i < item.InsertStart + item.Inserted; i++) { g.Rectangle (0, y, Allocation.Width, lineHeight); - g.SetSourceColor (SyntaxModeService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffAddedBackground)); + g.SetSourceColor (SyntaxHighlightingService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffAddedBackground)); g.Fill (); - g.SetSourceColor (SyntaxModeService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffAdded)); + g.SetSourceColor (SyntaxHighlightingService.GetColor (editor.Options.GetEditorTheme (), ThemeSettingColors.PreviewDiffAdded)); DrawTextLine (g, changedDocument, i, ref y); } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs index f64dc41fc1..1a156eb692 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs @@ -73,7 +73,7 @@ namespace Mono.TextEditor } cr.Rectangle (x, y, Width, lineHeight); - cr.SetSourceColor (SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbersBackground)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbersBackground)); cr.Fill (); } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/CodeSegmentPreviewWindow.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/CodeSegmentPreviewWindow.cs index 8b83632658..ff2f87a89e 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/CodeSegmentPreviewWindow.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/CodeSegmentPreviewWindow.cs @@ -160,12 +160,12 @@ namespace Mono.TextEditor protected override bool OnExposeEvent (Gdk.EventExpose ev) { if (textGC == null) { - var plainText = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); + var plainText = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); textGC = plainText.CreateGC (ev.Window); textBgGC = plainText.CreateGC (ev.Window); - var collapsedText = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.CollapsedText); + var collapsedText = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.CollapsedText); foldGC = collapsedText.CreateGC (ev.Window); foldBgGC = collapsedText.CreateGC (ev.Window); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/DashedLineMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/DashedLineMargin.cs index 8e910aff15..8245bc744a 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/DashedLineMargin.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/DashedLineMargin.cs @@ -47,7 +47,7 @@ namespace Mono.TextEditor internal protected override void OptionsChanged () { - color = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.CollapsedText); + color = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.CollapsedText); } internal protected override void Draw (Cairo.Context cr, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight) diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldMarkerMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldMarkerMargin.cs index 8314e5a2b7..bf6e5d4b6a 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldMarkerMargin.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldMarkerMargin.cs @@ -234,11 +234,11 @@ namespace Mono.TextEditor internal protected override void OptionsChanged () { - foldBgGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); - foldLineGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.FoldLine); - foldLineHighlightedGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); + foldBgGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); + foldLineGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.FoldLine); + foldLineHighlightedGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); - HslColor hslColor = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); + HslColor hslColor = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); double brightness = HslColor.Brightness (hslColor); if (brightness < 0.5) { hslColor.L = hslColor.L * 0.85 + hslColor.L * 0.25; @@ -247,10 +247,10 @@ namespace Mono.TextEditor } foldLineHighlightedGCBg = hslColor; - foldToggleMarkerGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.FoldCross); - foldToggleMarkerBackground = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.FoldCross2); - lineStateChangedGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.QuickDiffChanged); - lineStateDirtyGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.QuickDiffDirty); + foldToggleMarkerGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.FoldCross); + foldToggleMarkerBackground = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.FoldCross2); + lineStateChangedGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.QuickDiffChanged); + lineStateDirtyGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.QuickDiffDirty); marginWidth = editor.LineHeight * 3 / 4; } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs index 16aab8999c..280818373a 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs @@ -72,7 +72,7 @@ namespace Mono.TextEditor HslColor GetColor (int i, double brightness, int colorCount) { - HslColor hslColor = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); + HslColor hslColor = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); int colorPosition = i + 1; if (i == foldSegments.Count - 1) return hslColor; @@ -89,7 +89,7 @@ namespace Mono.TextEditor TextViewMargin textViewMargin = editor.TextViewMargin; TextViewMargin.LayoutWrapper lineLayout = null; - double brightness = HslColor.Brightness (SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background)); + double brightness = HslColor.Brightness (SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background)); int colorCount = foldSegments.Count + 2; cr.SetSourceColor (GetColor (-1, brightness, colorCount)); @@ -187,7 +187,7 @@ namespace Mono.TextEditor alpha = 0.1 + (1.0 - animationState) / 5; } - var bg = (Cairo.Color)SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); + var bg = (Cairo.Color)SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); cr.SetSourceRGBA (bg.R, bg.G, bg.B, alpha); clampedRect = ClampRect (rect.X - editor.HAdjustment.Value - curPadSize , rect.Y - editor.VAdjustment.Value - curPadSize, editor.LineHeight / 2, rect.Width + curPadSize * 2, rect.Height + curPadSize * 2, area); DrawRoundRectangle (cr, true, true, clampedRect.X, clampedRect.Y, editor.LineHeight / 2, clampedRect.Width, clampedRect.Height); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/GutterMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/GutterMargin.cs index 1c2b2f007c..761fa78c32 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/GutterMargin.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/GutterMargin.cs @@ -193,8 +193,8 @@ namespace Mono.TextEditor internal protected override void OptionsChanged () { - lineNumberBgGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbersBackground); - lineNumberGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbers); + lineNumberBgGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbersBackground); + lineNumberGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbers); gutterFont = editor.Options.GutterFont; // gutterFont.Weight = (Pango.Weight)editor.ColorStyle.LineNumbers.FontWeight; // gutterFont.Style = (Pango.Style)editor.ColorStyle.LineNumbers.FontStyle; diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/IconMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/IconMargin.cs index 4bb047373b..0bc6f51d00 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/IconMargin.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/IconMargin.cs @@ -51,8 +51,8 @@ namespace Mono.TextEditor internal protected override void OptionsChanged () { - backgroundColor = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.IndicatorMargin); - separatorColor = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.IndicatorMarginSeparator); + backgroundColor = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.IndicatorMargin); + separatorColor = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.IndicatorMarginSeparator); } internal protected override void MousePressed (MarginMouseEventArgs args) diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs index d3ba4cf7ea..10502bcc6b 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs @@ -764,14 +764,14 @@ namespace Mono.TextEditor if (parent != null) { - parent.ModifyBg (StateType.Normal, SyntaxModeService.GetColor (textEditorData.ColorStyle, ThemeSettingColors.Background)); + parent.ModifyBg (StateType.Normal, SyntaxHighlightingService.GetColor (textEditorData.ColorStyle, ThemeSettingColors.Background)); } // set additionally the real parent background for gtk themes that use the content background // to draw the scrollbar slider trough. - this.Parent.ModifyBg (StateType.Normal, SyntaxModeService.GetColor (textEditorData.ColorStyle, ThemeSettingColors.Background)); + this.Parent.ModifyBg (StateType.Normal, SyntaxHighlightingService.GetColor (textEditorData.ColorStyle, ThemeSettingColors.Background)); - this.ModifyBg (StateType.Normal, SyntaxModeService.GetColor (textEditorData.ColorStyle, ThemeSettingColors.Background)); + this.ModifyBg (StateType.Normal, SyntaxHighlightingService.GetColor (textEditorData.ColorStyle, ThemeSettingColors.Background)); settingWidgetBg = false; } } @@ -2415,7 +2415,7 @@ namespace Mono.TextEditor System.Math.Min (editor.TextViewMargin.charWidth / 2, width), width, editor.LineHeight + 2 * extend * editor.Options.Zoom); - Cairo.Color color = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); + Cairo.Color color = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); color.A = 0.8; cr.LineWidth = editor.Options.Zoom; cr.SetSourceColor (color); @@ -2479,7 +2479,7 @@ namespace Mono.TextEditor System.Math.Min (editor.TextViewMargin.charWidth / 2, width), width, (int)(region.Height + 2 * animationPosition * editor.Options.Zoom)); - Cairo.Color color = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); + Cairo.Color color = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Foreground); color.A = 0.8; cr.LineWidth = editor.Options.Zoom; cr.SetSourceColor (color); @@ -2675,7 +2675,7 @@ namespace Mono.TextEditor FoldingScreenbackgroundRenderer.DrawRoundRectangle (cr, true, true, shadowOffset, shadowOffset, corner, width, height); // TODO: EditorTheme : searchResultMainColor? - var searchResultMainColor = SyntaxModeService.GetColor (Editor.EditorTheme, ThemeSettingColors.FindHighlight); + var searchResultMainColor = SyntaxHighlightingService.GetColor (Editor.EditorTheme, ThemeSettingColors.FindHighlight); var color = TextViewMargin.DimColor (searchResultMainColor, 0.3); color.A = 0.5 * opacity * opacity; cr.SetSourceColor (color); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs index 6c29943e87..0faa5a8e29 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs @@ -151,14 +151,14 @@ namespace Mono.TextEditor void HandleFocusInEvent (object o, FocusInEventArgs args) { - selectionColor = SyntaxModeService.GetColor (EditorTheme, ThemeSettingColors.Selection); - currentLineColor = SyntaxModeService.GetColor (EditorTheme, ThemeSettingColors.LineHighlight); + selectionColor = SyntaxHighlightingService.GetColor (EditorTheme, ThemeSettingColors.Selection); + currentLineColor = SyntaxHighlightingService.GetColor (EditorTheme, ThemeSettingColors.LineHighlight); } void HandleFocusOutEvent (object o, FocusOutEventArgs args) { - selectionColor = SyntaxModeService.GetColor (EditorTheme, ThemeSettingColors.InactiveSelection); - currentLineColor = SyntaxModeService.GetColor (EditorTheme, ThemeSettingColors.InactiveLineHighlight); + selectionColor = SyntaxHighlightingService.GetColor (EditorTheme, ThemeSettingColors.InactiveSelection); + currentLineColor = SyntaxHighlightingService.GetColor (EditorTheme, ThemeSettingColors.InactiveLineHighlight); } void HandleTextReplaced (object sender, TextChangeEventArgs e) @@ -614,7 +614,7 @@ namespace Mono.TextEditor caretVAdjustmentValue = textEditor.VAdjustment.Value; } - var fgColor = SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground); + var fgColor = SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground); // var bgColor = textEditor.ColorStyle.Default.CairoBackgroundColor; var line = Document.GetLine (Caret.Line); if (line != null) { @@ -653,7 +653,7 @@ namespace Mono.TextEditor layout.FontDescription = textEditor.Options.Font; layout.SetText (caretChar.ToString ()); cr.MoveTo (caretRectangle.X, caretRectangle.Y); - cr.SetSourceColor (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background)); cr.ShowLayout (layout); } } @@ -905,7 +905,7 @@ namespace Mono.TextEditor } atts.AddForegroundAttribute ((HslColor)color, si, ei); - if (!chunkStyle.TransparentBackground && GetPixel (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background)) != GetPixel (chunkStyle.Background)) { + if (!chunkStyle.TransparentBackground && GetPixel (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background)) != GetPixel (chunkStyle.Background)) { wrapper.AddBackground (chunkStyle.Background, (int)si, (int)ei); } /*else if (chunk.SpanStack != null && ColorStyle != null) { foreach (var span in chunk.SpanStack) { @@ -963,10 +963,10 @@ namespace Mono.TextEditor ei += len; } - atts.AddForegroundAttribute (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground), si, ei); + atts.AddForegroundAttribute (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground), si, ei); var hasBackground = wrapper.BackgroundColors.Any (bg => bg.FromIdx <= si && bg.ToIdx >= ei); if (hasBackground) - atts.AddBackgroundAttribute (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background), si, ei); + atts.AddBackgroundAttribute (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background), si, ei); atts.InsertOffsetList (textEditor.preeditAttrs, si, ei); } wrapper.LineChars = lineChars; @@ -1294,7 +1294,7 @@ namespace Mono.TextEditor HslColor SelectionColor { get { if (selectionColor == null) - selectionColor = MonoDevelop.Ide.Editor.Highlighting.SyntaxModeService.GetColor (EditorTheme, textEditor.HasFocus ? ThemeSettingColors.Selection : ThemeSettingColors.InactiveSelection); + selectionColor = MonoDevelop.Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (EditorTheme, textEditor.HasFocus ? ThemeSettingColors.Selection : ThemeSettingColors.InactiveSelection); return selectionColor.Value; } } @@ -1303,7 +1303,7 @@ namespace Mono.TextEditor HslColor CurrentLineColor { get { if (currentLineColor == null) - currentLineColor = MonoDevelop.Ide.Editor.Highlighting.SyntaxModeService.GetColor (EditorTheme, textEditor.HasFocus ? ThemeSettingColors.LineHighlight : ThemeSettingColors.InactiveLineHighlight); + currentLineColor = MonoDevelop.Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (EditorTheme, textEditor.HasFocus ? ThemeSettingColors.LineHighlight : ThemeSettingColors.InactiveLineHighlight); return currentLineColor.Value; } } @@ -1349,7 +1349,7 @@ namespace Mono.TextEditor var lastColor = new Cairo.Color (); bool firstDraw = true; - var foregroundColor = SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground); + var foregroundColor = SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground); int lastIndex = -1; int lastPosX = 0; @@ -1437,7 +1437,7 @@ namespace Mono.TextEditor return; xPos = System.Math.Floor (xPos); cr.Rectangle (xPos, y, width, lineHeight); - var color = SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.LineHighlight); + var color = SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.LineHighlight); cr.SetSourceColor (color); cr.Fill (); //double halfLine = (cr.LineWidth / 2.0); @@ -1476,7 +1476,7 @@ namespace Mono.TextEditor cr.MoveTo (x + 0.5, top); cr.LineTo (x + 0.5, bottom); - cr.SetSourceColor (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.IndentationGuide)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.IndentationGuide)); cr.Stroke (); } cr.Restore (); @@ -1604,7 +1604,7 @@ namespace Mono.TextEditor cr, xPos + textEditor.HAdjustment.Value - TextStartPosition, new Cairo.Rectangle (xPos + startX, startY, endX - startX, LineHeight), - SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), + SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), true ); } else { @@ -1612,7 +1612,7 @@ namespace Mono.TextEditor cr, xPos + textEditor.HAdjustment.Value - TextStartPosition, new Cairo.Rectangle (xPos + startX, startY, textEditor.Allocation.Width - xPos - startX, LineHeight), - SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), + SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), true ); @@ -1621,7 +1621,7 @@ namespace Mono.TextEditor cr, xPos, new Cairo.Rectangle (xPos, startY + LineHeight, textEditor.Allocation.Width - xPos, endY - startY - LineHeight), - SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), + SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), true ); } @@ -1630,7 +1630,7 @@ namespace Mono.TextEditor cr, xPos, new Cairo.Rectangle (xPos, endY, endX, LineHeight), - SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), + SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), true ); } @@ -1659,7 +1659,7 @@ namespace Mono.TextEditor // TODO : EditorTheme // var color = MainSearchResult.IsInvalid () || MainSearchResult.Offset != firstSearch.Offset ? EditorTheme.SearchResult.Color : EditorTheme.SearchResultMain.Color; - var color = SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.FindHighlight); + var color = SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.FindHighlight); cr.SetSourceColor (color); FoldingScreenbackgroundRenderer.DrawRoundRectangle (cr, true, true, s, y, corner, w + 1, LineHeight); cr.Fill (); @@ -1690,7 +1690,7 @@ namespace Mono.TextEditor startX = xPos; endX = position + wrapper.Width + layout.Width; - DrawRectangleWithRuler (cr, xPos + textEditor.HAdjustment.Value - TextStartPosition, new Cairo.Rectangle (startX, y, endX - startX, _lineHeight), SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), true); + DrawRectangleWithRuler (cr, xPos + textEditor.HAdjustment.Value - TextStartPosition, new Cairo.Rectangle (startX, y, endX - startX, _lineHeight), SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), true); if (lineNumber == Caret.Line && textEditor.Options.ShowWhitespaces == ShowWhitespaces.Selection && @@ -1814,7 +1814,7 @@ namespace Mono.TextEditor rect = eolMarkerLayoutRect [index]; cr.Save (); cr.Translate (x, y + System.Math.Max (0, LineHeight - rect.Height - 1)); - var col = (Cairo.Color)SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground); + var col = (Cairo.Color)SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Foreground); /* if (selected && !SelectionColor.TransparentForeground) { col = SelectionColor.Foreground; @@ -2446,7 +2446,7 @@ namespace Mono.TextEditor if (beforeDividerWidth > 0) { cr.DrawLine ( - SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Ruler), + SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Ruler), divider + 0.5, area.Y, divider + 0.5, area.Y + area.Height); } @@ -2638,7 +2638,7 @@ namespace Mono.TextEditor var correctedXOffset = System.Math.Floor (XOffset) - 1; var lineArea = new Cairo.Rectangle (correctedXOffset, y, textEditor.Allocation.Width - correctedXOffset, _lineHeight); double position = x - textEditor.HAdjustment.Value + TextStartPosition; - var bgColor = SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background); + var bgColor = SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background); // TODO : EditorTheme does that look good ? if (Document.IsReadOnly) { if (HslColor.Brightness (bgColor) < 0.5) @@ -2698,13 +2698,13 @@ namespace Mono.TextEditor this.LineHeight); if (BackgroundRenderer == null && isFoldingSelected) { - cr.SetSourceColor (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection)); cr.Rectangle (foldingRectangle); cr.Fill (); } // if (isFoldingSelected && SelectionColor.TransparentForeground) { - cr.SetSourceColor (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.CollapsedText)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.CollapsedText)); // } else { // cr.SetSourceColor (isFoldingSelected ? SelectionColor.Foreground : EditorTheme.CollapsedText.Foreground); //} @@ -2786,7 +2786,7 @@ namespace Mono.TextEditor DrawRectangleWithRuler (cr, x, new Cairo.Rectangle (lineArea.X, lineArea.Y, x1 - lineArea.X, lineArea.Height), defaultBgColor, false); lineArea = new Cairo.Rectangle (x1, lineArea.Y, lineArea.Width, lineArea.Height); } - DrawRectangleWithRuler (cr, x, new Cairo.Rectangle (lineArea.X, lineArea.Y, x2 - lineArea.X, lineArea.Height), SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), false); + DrawRectangleWithRuler (cr, x, new Cairo.Rectangle (lineArea.X, lineArea.Y, x2 - lineArea.X, lineArea.Height), SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), false); lineArea = new Cairo.Rectangle (x2, lineArea.Y, textEditor.Allocation.Width - lineArea.X, lineArea.Height); } } @@ -2806,7 +2806,7 @@ namespace Mono.TextEditor LineHeight); } if (lineNr != textEditor.MainSelection.End.Line) - DrawRectangleWithRuler (cr, x, lineArea, SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), false); + DrawRectangleWithRuler (cr, x, lineArea, SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Selection), false); if (line.Length == 0) DrawIndent (cr, wrapper, line, lx, y); } else if (!(HighlightCaretLine || textEditor.GetTextEditorData ().HighlightCaretLine) || Caret.Line != lineNr && Caret.Line != startLineNr) { @@ -2816,7 +2816,7 @@ namespace Mono.TextEditor var spanStyle = textEditor.EditorTheme.GetChunkStyle (span.Color); if (spanStyle == null) continue; - if (!spanStyle.TransparentBackground && GetPixel (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background)) != GetPixel (spanStyle.Background)) { + if (!spanStyle.TransparentBackground && GetPixel (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.Background)) != GetPixel (spanStyle.Background)) { DrawRectangleWithRuler (cr, x, lineArea, spanStyle.Background, false); break; } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs index 8ac31d4b77..b222de3fb5 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs @@ -157,14 +157,14 @@ namespace MonoDevelop.SourceEditor.OptionPanels { try { error = false; - return SyntaxModeService.GetEditorTheme (styleName); + return SyntaxHighlightingService.GetEditorTheme (styleName); } catch (StyleImportException) { error = true; - return new EditorTheme (styleName, new System.Collections.Generic.List<ThemeSetting> (SyntaxModeService.DefaultColorStyle.Settings)); + return new EditorTheme (styleName, new System.Collections.Generic.List<ThemeSetting> (SyntaxHighlightingService.DefaultColorStyle.Settings)); } catch (Exception e) { LoggingService.LogError ("Error while loading color style " + styleName, e); error = true; - return new EditorTheme (styleName, new System.Collections.Generic.List<ThemeSetting> (SyntaxModeService.DefaultColorStyle.Settings)); + return new EditorTheme (styleName, new System.Collections.Generic.List<ThemeSetting> (SyntaxHighlightingService.DefaultColorStyle.Settings)); } } @@ -175,7 +175,7 @@ namespace MonoDevelop.SourceEditor.OptionPanels bool error; var defaultStyle = LoadStyle (MonoDevelop.Ide.Editor.Highlighting.EditorTheme.DefaultThemeName, out error); TreeIter selectedIter = styleStore.AppendValues (GetMarkup (defaultStyle.Name, ""), defaultStyle); - foreach (string styleName in SyntaxModeService.Styles) { + foreach (string styleName in SyntaxHighlightingService.Styles) { if (styleName == MonoDevelop.Ide.Editor.Highlighting.EditorTheme.DefaultThemeName) continue; var style = LoadStyle (styleName, out error); @@ -208,7 +208,7 @@ namespace MonoDevelop.SourceEditor.OptionPanels string fileName = sheme.FileName; if (fileName != null && fileName.StartsWith (MonoDevelop.Ide.Editor.TextEditorDisplayBinding.SyntaxModePath, StringComparison.Ordinal)) { - SyntaxModeService.Remove (sheme); + SyntaxHighlightingService.Remove (sheme); File.Delete (fileName); ShowStyles (); } @@ -263,7 +263,7 @@ namespace MonoDevelop.SourceEditor.OptionPanels LoggingService.LogError ("Can't copy syntax mode file.", e); } if (success) { - SyntaxModeService.LoadStylesAndModes (TextEditorDisplayBinding.SyntaxModePath); + SyntaxHighlightingService.LoadStylesAndModes (TextEditorDisplayBinding.SyntaxModePath); MonoDevelop.Ide.Editor.TextEditorDisplayBinding.LoadCustomStylesAndModes (); ShowStyles (); } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/NewColorShemeDialog.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/NewColorShemeDialog.cs index 231a6b4043..c0bd879519 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/NewColorShemeDialog.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/NewColorShemeDialog.cs @@ -38,7 +38,7 @@ namespace MonoDevelop.SourceEditor.OptionPanels { this.Build (); - foreach (string styleName in SyntaxModeService.Styles) { + foreach (string styleName in SyntaxHighlightingService.Styles) { store.AppendValues (styleName); } comboboxBaseStyle.Model = store; diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskMiniMapMode.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskMiniMapMode.cs index b939cdfabd..2364cc5dcc 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskMiniMapMode.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskMiniMapMode.cs @@ -220,7 +220,7 @@ namespace MonoDevelop.SourceEditor.QuickTasks if (TextEditor.EditorTheme != null) { using (var cr = Gdk.CairoHelper.Create (backgroundPixbuf)) { cr.Rectangle (0, 0, curWidth, curHeight); - cr.SetSourceColor (SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background)); cr.Fill (); } } @@ -251,7 +251,7 @@ namespace MonoDevelop.SourceEditor.QuickTasks int h = mode.backgroundBuffer.ClipRegion.Clipbox.Height; cr.Rectangle (0, 0, w, h); if (mode.TextEditor.EditorTheme != null) - cr.SetSourceColor (SyntaxModeService.GetColor (mode.TextEditor.EditorTheme, ThemeSettingColors.Background)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (mode.TextEditor.EditorTheme, ThemeSettingColors.Background)); cr.Fill (); maxLine = mode.TextEditor.GetTextEditorData ().VisibleLineCount; @@ -328,7 +328,7 @@ namespace MonoDevelop.SourceEditor.QuickTasks } else { cr.Rectangle (0, 0, Allocation.Width, Allocation.Height); if (TextEditor.EditorTheme != null) - cr.SetSourceColor (SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background)); cr.Fill (); } /* diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs index b53b8c74be..80a63d2557 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs @@ -521,13 +521,13 @@ namespace MonoDevelop.SourceEditor.QuickTasks return new Cairo.Color (0, 0, 0); switch (severity) { case DiagnosticSeverity.Error: - return SyntaxModeService.GetColor (style, ThemeSettingColors.UnderlineError); + return SyntaxHighlightingService.GetColor (style, ThemeSettingColors.UnderlineError); case DiagnosticSeverity.Warning: - return SyntaxModeService.GetColor (style, ThemeSettingColors.UnderlineWarning); + return SyntaxHighlightingService.GetColor (style, ThemeSettingColors.UnderlineWarning); case DiagnosticSeverity.Info: - return SyntaxModeService.GetColor (style, ThemeSettingColors.UnderlineSuggestion); + return SyntaxHighlightingService.GetColor (style, ThemeSettingColors.UnderlineSuggestion); case DiagnosticSeverity.Hidden: - return SyntaxModeService.GetColor (style, ThemeSettingColors.Background); + return SyntaxHighlightingService.GetColor (style, ThemeSettingColors.Background); default: throw new ArgumentOutOfRangeException (); } @@ -688,7 +688,7 @@ namespace MonoDevelop.SourceEditor.QuickTasks cr.LineTo (7, y); cr.LineTo (0, y + 4); cr.ClosePath (); - cr.SetSourceColor (SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Foreground)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Foreground)); cr.Fill (); } @@ -710,19 +710,19 @@ namespace MonoDevelop.SourceEditor.QuickTasks if (lineCache[0].Contains (y)) return; lineCache[0].Add (y); - var usageColor = (Cairo.Color)SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Foreground); + var usageColor = (Cairo.Color)SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Foreground); usageColor.A = 0.4; HslColor color; if ((usage.UsageType & MonoDevelop.Ide.FindInFiles.ReferenceUsageType.Declariton) != 0) { - color = SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.ChangingUsagesRectangle); + color = SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.ChangingUsagesRectangle); if (color.Alpha == 0.0) - color = SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.UsagesRectangle); + color = SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.UsagesRectangle); } else if ((usage.UsageType & MonoDevelop.Ide.FindInFiles.ReferenceUsageType.Write) != 0) { - color = SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.ChangingUsagesRectangle); + color = SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.ChangingUsagesRectangle); if (color.Alpha == 0.0) - color = SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.UsagesRectangle); + color = SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.UsagesRectangle); } else if ((usage.UsageType & MonoDevelop.Ide.FindInFiles.ReferenceUsageType.Read) != 0 || (usage.UsageType & MonoDevelop.Ide.FindInFiles.ReferenceUsageType.Keyword) != 0) { - color = SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.UsagesRectangle); + color = SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.UsagesRectangle); } else { color = usageColor; } @@ -757,7 +757,7 @@ namespace MonoDevelop.SourceEditor.QuickTasks cr.MoveTo (0.5, 0); cr.LineTo (0.5, Allocation.Height); if (TextEditor.EditorTheme != null) { - var col = (Xwt.Drawing.Color)SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background); + var col = (Xwt.Drawing.Color)SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background); if (!MonoDevelop.Core.Platform.IsWindows) { col.Light *= 0.95; } @@ -811,9 +811,9 @@ namespace MonoDevelop.SourceEditor.QuickTasks if (MonoDevelop.Core.Platform.IsWindows) { c = prelight ? win81SliderPrelight : win81Slider; //compute new color such that it will produce same color when blended with bg - c = AddAlpha (SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background), c, 0.5d); + c = AddAlpha (SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background), c, 0.5d); } else { - var brightness = HslColor.Brightness (SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background)); + var brightness = HslColor.Brightness (SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background)); c = new Cairo.Color (1 - brightness, 1 - brightness, 1 - brightness, barColorValue * (barAlphaMax - barAlphaMin) + barAlphaMin); } cr.SetSourceColor (c); @@ -848,7 +848,7 @@ namespace MonoDevelop.SourceEditor.QuickTasks bool isMainSelection = false; if (!TextEditor.TextViewMargin.MainSearchResult.IsInvalid ()) isMainSelection = region.Offset == TextEditor.TextViewMargin.MainSearchResult.Offset; - var color = SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.FindHighlight); + var color = SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.FindHighlight); if (isMainSelection) { // TODO: EditorTheme does that look ok ? if (HslColor.Brightness (color) < 0.5) { @@ -1059,7 +1059,7 @@ namespace MonoDevelop.SourceEditor.QuickTasks cr.Rectangle (0, 0, allocation.Width, allocation.Height); if (TextEditor.EditorTheme != null) { - var bgColor = SyntaxModeService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background); + var bgColor = SyntaxHighlightingService.GetColor (TextEditor.EditorTheme, ThemeSettingColors.Background); if (MonoDevelop.Core.Platform.IsWindows) { using (var pattern = new Cairo.SolidPattern (bgColor)) { cr.SetSource (pattern); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/EditorFactory.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/EditorFactory.cs index 3e95eda040..59469e5af2 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/EditorFactory.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/EditorFactory.cs @@ -75,7 +75,7 @@ namespace MonoDevelop.SourceEditor string[] ITextEditorFactory.GetSyntaxProperties (string mimeType, string name) { - var mode = SyntaxModeService.GetSyntaxHighlightingDefinition (null, mimeType); + var mode = SyntaxHighlightingService.GetSyntaxHighlightingDefinition (null, mimeType); if (mode == null) return null; // TODO: EditorTheme - remove the syntax properties or translate them to new language properties/services diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs index 9b3b8e9e8f..456f7c850a 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs @@ -238,9 +238,9 @@ namespace MonoDevelop.SourceEditor protected internal override string GetIdeColorStyleName () { - var scheme = Ide.Editor.Highlighting.SyntaxModeService.GetEditorTheme (IdeApp.Preferences.ColorScheme); + var scheme = Ide.Editor.Highlighting.SyntaxHighlightingService.GetEditorTheme (IdeApp.Preferences.ColorScheme); if (!scheme.FitsIdeTheme (IdeApp.Preferences.UserInterfaceTheme)) - scheme = Ide.Editor.Highlighting.SyntaxModeService.GetDefaultColorStyle (IdeApp.Preferences.UserInterfaceTheme); + scheme = Ide.Editor.Highlighting.SyntaxHighlightingService.GetDefaultColorStyle (IdeApp.Preferences.UserInterfaceTheme); return scheme.Name; } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs index a01819088a..5e3f9537b1 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs @@ -208,68 +208,68 @@ namespace MonoDevelop.SourceEditor internal HslColor MarkerColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorMarker : ThemeSettingColors.MessageBubbleWarningMarker); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorMarker : ThemeSettingColors.MessageBubbleWarningMarker); } } internal HslColor TagColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorTag : ThemeSettingColors.MessageBubbleWarningTag); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorTag : ThemeSettingColors.MessageBubbleWarningTag); } } internal HslColor TagColor2 { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorTag2 : ThemeSettingColors.MessageBubbleWarningTag2); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorTag2 : ThemeSettingColors.MessageBubbleWarningTag2); } } internal HslColor TooltipColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorTooltip : ThemeSettingColors.MessageBubbleWarningTooltip); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorTooltip : ThemeSettingColors.MessageBubbleWarningTooltip); } } internal HslColor LineColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorLine : ThemeSettingColors.MessageBubbleWarningLine); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorLine : ThemeSettingColors.MessageBubbleWarningLine); } } internal HslColor LineColor2 { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorLine2 : ThemeSettingColors.MessageBubbleWarningLine2); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorLine2 : ThemeSettingColors.MessageBubbleWarningLine2); } } internal HslColor BorderLineColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorBorderLine : ThemeSettingColors.MessageBubbleWarningBorderLine); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorBorderLine : ThemeSettingColors.MessageBubbleWarningBorderLine); } } internal HslColor CounterColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorCounter : ThemeSettingColors.MessageBubbleWarningCounter); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorCounter : ThemeSettingColors.MessageBubbleWarningCounter); } } internal HslColor CounterColor2 { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorCounter2 : ThemeSettingColors.MessageBubbleWarningCounter2); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorCounter2 : ThemeSettingColors.MessageBubbleWarningCounter2); } } internal HslColor IconMarginColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorIconMargin : ThemeSettingColors.MessageBubbleWarningIconMargin); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorIconMargin : ThemeSettingColors.MessageBubbleWarningIconMargin); } } internal HslColor IconMarginBorderColor { get { - return Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorIconMarginBorder : ThemeSettingColors.MessageBubbleWarningIconMarginBorder); + return Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, isError ? ThemeSettingColors.MessageBubbleErrorIconMarginBorder : ThemeSettingColors.MessageBubbleWarningIconMarginBorder); } } @@ -279,7 +279,7 @@ namespace MonoDevelop.SourceEditor if (!selected) return color; - var selectionColor = (Cairo.Color)Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Selection); + var selectionColor = (Cairo.Color)Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Selection); const double bubbleAlpha = 0.1; return new Cairo.Color ( (color.R * bubbleAlpha + selectionColor.R * (1 - bubbleAlpha)), @@ -292,7 +292,7 @@ namespace MonoDevelop.SourceEditor { if (!highlighted) return color; - var selectionColor = (Cairo.Color)Ide.Editor.Highlighting.SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); + var selectionColor = (Cairo.Color)Ide.Editor.Highlighting.SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); const double bubbleAlpha = 0.7; return new Cairo.Color ( (color.R * bubbleAlpha + selectionColor.R * (1 - bubbleAlpha)), diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/OverlayMessageWindow.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/OverlayMessageWindow.cs index a181833d4c..28200a7cfb 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/OverlayMessageWindow.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/OverlayMessageWindow.cs @@ -107,13 +107,13 @@ namespace MonoDevelop.SourceEditor cr.LineWidth = 1; cr.Rectangle (0, 0, Allocation.Width, Allocation.Height); - cr.SetSourceColor (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationTextBackground)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationTextBackground)); cr.Fill (); cr.RoundedRectangle (0, 0, Allocation.Width, Allocation.Height, 3); - cr.SetSourceColor (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationTextBackground)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationTextBackground)); cr.FillPreserve (); - cr.SetSourceColor (SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationBorder)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationBorder)); cr.Stroke(); } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchInSelectionMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchInSelectionMarker.cs index 80d2c7f64d..4f02db3221 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchInSelectionMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchInSelectionMarker.cs @@ -48,8 +48,8 @@ namespace MonoDevelop.SourceEditor if (metrics.TextEndOffset < markerEnd) to = metrics.WholeLineWidth + metrics.TextRenderStartPosition; - var c1 = (Cairo.Color)SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); - var c2 = (Cairo.Color)SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Selection); + var c1 = (Cairo.Color)SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); + var c2 = (Cairo.Color)SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Selection); cr.SetSourceRGB ((c1.R + c2.R) / 2, (c1.G + c2.G) / 2, (c1.B + c2.B) / 2); cr.Rectangle (@from, y, to - @from, metrics.LineHeight); cr.Fill (); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs index 716f73ed17..78b91a88c2 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs @@ -64,7 +64,7 @@ namespace MonoDevelop.SourceEditor SetHeaderFormat (settings.HeaderFormat); SetFooterFormat (settings.FooterFormat); - style = SyntaxModeService.GetEditorTheme (settings.EditorTheme); + style = SyntaxHighlightingService.GetEditorTheme (settings.EditorTheme); pageWidth = context.PageSetup.GetPageWidth (Unit.Pixel); pageHeight = context.PageSetup.GetPageHeight (Unit.Pixel); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs index 7bc7b46a3d..ea7bbda8a1 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs @@ -249,7 +249,7 @@ namespace MonoDevelop.SourceEditor var sm = Document.SyntaxMode; if (sm == DefaultSyntaxHighlighting.Instance) { foreach (string mt in DesktopService.GetMimeTypeInheritanceChain (Document.MimeType)) { - var syntaxMode = SyntaxModeService.GetSyntaxHighlightingDefinition (Document.FileName, mt); + var syntaxMode = SyntaxHighlightingService.GetSyntaxHighlightingDefinition (Document.FileName, mt); if (syntaxMode != null) { Document.SyntaxMode = new SyntaxHighlighting (syntaxMode, Document); @@ -2140,7 +2140,7 @@ namespace MonoDevelop.SourceEditor ClipbardRingUpdated (null, EventArgs.Empty); }; SyntaxModeLoader.Init (); - SyntaxModeService.LoadStylesAndModes (TextEditorDisplayBinding.SyntaxModePath); + SyntaxHighlightingService.LoadStylesAndModes (TextEditorDisplayBinding.SyntaxModePath); } public void UpdateClipboardRing (object sender, EventArgs e) @@ -3070,7 +3070,7 @@ namespace MonoDevelop.SourceEditor var bracketMatch = new Cairo.Rectangle (fromX + 0.5, metrics.LineYRenderStartPosition + 0.5, toX - fromX - 1, editor.LineHeight - 2); if (editor.TextViewMargin.BackgroundRenderer == null) { - cr.SetSourceColor (SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.BracketsForeground)); + cr.SetSourceColor (SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.BracketsForeground)); cr.Rectangle (bracketMatch); cr.Fill (); } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs index fcbc72eb85..e9db2252ae 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs @@ -357,7 +357,7 @@ namespace MonoDevelop.SourceEditor { var editor = (Mono.TextEditor.MonoTextEditor)scrolledWindow.Child; - scrolledBackground.ModifyBg (StateType.Normal, SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background)); + scrolledBackground.ModifyBg (StateType.Normal, SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background)); } void RemoveEvents () @@ -889,7 +889,7 @@ namespace MonoDevelop.SourceEditor var image = new HoverCloseButton (); hbox.PackStart (image, false, false, 0); var label = new Label (string.Format ("This file has line endings ({0}) which differ from the policy settings ({1}).", GetEolString (DetectedEolMarker), GetEolString (textEditor.Options.DefaultEolMarker))); - var color = (HslColor)SyntaxModeService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationText); + var color = (HslColor)SyntaxHighlightingService.GetColor (textEditor.EditorTheme, ThemeSettingColors.NotificationText); label.ModifyFg (StateType.Normal, color); int w, h; diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs index ef8a23b179..2003ad32f5 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs @@ -231,7 +231,7 @@ namespace MonoDevelop.SourceEditor { IconMarker = new DebugIconMarker (isTracepoint ? tracepoint : breakpoint); - TextMarker = new DebugTextMarker (offset, length, e => SyntaxModeService.GetColor (e.EditorTheme, ThemeSettingColors.BreakpointMarker), e => SyntaxModeService.GetChunkStyle (e.EditorTheme, ThemeSettingColors.BreakpointText)); + TextMarker = new DebugTextMarker (offset, length, e => SyntaxHighlightingService.GetColor (e.EditorTheme, ThemeSettingColors.BreakpointMarker), e => SyntaxHighlightingService.GetChunkStyle (e.EditorTheme, ThemeSettingColors.BreakpointText)); } } @@ -243,7 +243,7 @@ namespace MonoDevelop.SourceEditor public DisabledBreakpointTextMarker (MonoTextEditor editor, int offset, int length, bool isTracepoint) { IconMarker = new DebugIconMarker (isTracepoint ? tracepoint : breakpoint); - TextMarker = new DebugTextMarker (offset, length, e => SyntaxModeService.GetColor (e.EditorTheme, ThemeSettingColors.BreakpointMarkerDisabled)); + TextMarker = new DebugTextMarker (offset, length, e => SyntaxHighlightingService.GetColor (e.EditorTheme, ThemeSettingColors.BreakpointMarkerDisabled)); } } @@ -255,7 +255,7 @@ namespace MonoDevelop.SourceEditor public InvalidBreakpointTextMarker (MonoTextEditor editor, int offset, int length, bool isTracepoint) { IconMarker = new DebugIconMarker (isTracepoint ? tracepoint : breakpoint); - TextMarker = new DebugTextMarker (offset, length, e => SyntaxModeService.GetColor (e.EditorTheme, ThemeSettingColors.BreakpointMarkerInvalid)); + TextMarker = new DebugTextMarker (offset, length, e => SyntaxHighlightingService.GetColor (e.EditorTheme, ThemeSettingColors.BreakpointMarkerInvalid)); } } @@ -266,7 +266,7 @@ namespace MonoDevelop.SourceEditor public DebugStackLineTextMarker (MonoTextEditor editor, int offset, int length) { IconMarker = new DebugIconMarker (stackLine); - TextMarker = new DebugTextMarker (offset, length, e => SyntaxModeService.GetColor (e.EditorTheme, ThemeSettingColors.DebuggerStackLineMarker), e => SyntaxModeService.GetChunkStyle (e.EditorTheme, ThemeSettingColors.DebuggerStackLine)); + TextMarker = new DebugTextMarker (offset, length, e => SyntaxHighlightingService.GetColor (e.EditorTheme, ThemeSettingColors.DebuggerStackLineMarker), e => SyntaxHighlightingService.GetChunkStyle (e.EditorTheme, ThemeSettingColors.DebuggerStackLine)); } } @@ -277,7 +277,7 @@ namespace MonoDevelop.SourceEditor public CurrentDebugLineTextMarker (MonoTextEditor editor, int offset, int length) { IconMarker = new DebugIconMarker (currentLine); - TextMarker = new DebugTextMarker (offset, length, e => SyntaxModeService.GetColor (e.EditorTheme, ThemeSettingColors.DebuggerCurrentLineMarker), e => SyntaxModeService.GetChunkStyle (e.EditorTheme, ThemeSettingColors.DebuggerCurrentLine)); + TextMarker = new DebugTextMarker (offset, length, e => SyntaxHighlightingService.GetColor (e.EditorTheme, ThemeSettingColors.DebuggerCurrentLineMarker), e => SyntaxHighlightingService.GetChunkStyle (e.EditorTheme, ThemeSettingColors.DebuggerCurrentLine)); } public bool IsVisible { get { return IconMarker.IsVisible; } set { IconMarker.IsVisible = value; } } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/ErrorMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/ErrorMarker.cs index f0e961df6f..422273033c 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/ErrorMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/ErrorMarker.cs @@ -46,7 +46,7 @@ namespace MonoDevelop.SourceEditor public override void Draw (Mono.TextEditor.MonoTextEditor editor, Cairo.Context cr, LineMetrics metrics, int startOffset, int endOffset) { - Color = SyntaxModeService.GetColor (editor.EditorTheme, info.ErrorType == ErrorType.Warning ? ThemeSettingColors.UnderlineWarning : ThemeSettingColors.UnderlineError); + Color = SyntaxHighlightingService.GetColor (editor.EditorTheme, info.ErrorType == ErrorType.Warning ? ThemeSettingColors.UnderlineWarning : ThemeSettingColors.UnderlineError); base.Draw (editor, cr, metrics, startOffset, endOffset); } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/GrayOutMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/GrayOutMarker.cs index bd7d3a894a..2bc9f5e8f6 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/GrayOutMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/GrayOutMarker.cs @@ -74,7 +74,7 @@ namespace MonoDevelop.SourceEditor if (chunk.EndOffset <= markerStart || markerEnd <= chunk.Offset) return; - var bgc = (Cairo.Color)SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); + var bgc = (Cairo.Color)SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background); double alpha = 0.6; color = new Cairo.Color ( color.R * alpha + bgc.R * (1.0 - alpha), diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/LinkMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/LinkMarker.cs index a61839a50d..3ebfac4491 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/LinkMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/LinkMarker.cs @@ -46,7 +46,7 @@ namespace MonoDevelop.SourceEditor public LinkMarker (int offset, int length, Action<LinkRequest> activateLink) : base (null, new TextSegment (offset, length)) { - this.Color = SyntaxModeService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.Link); + this.Color = SyntaxHighlightingService.GetColor (DefaultSourceEditorOptions.Instance.GetEditorTheme (), ThemeSettingColors.Link); this.activateLink = activateLink; this.Wave = false; } @@ -117,7 +117,7 @@ namespace MonoDevelop.SourceEditor return; } - this.Color = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Link); + this.Color = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Link); if (!OnlyShowLinkOnHover) { if (editor.TextViewMargin.MarginCursor == textLinkCursor && editor.TextViewMargin.HoveredLine != null) { diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/SmartTagMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/SmartTagMarker.cs index af5a3e7e21..6aa47bd2a7 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/SmartTagMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/SmartTagMarker.cs @@ -52,7 +52,7 @@ namespace MonoDevelop.SourceEditor var x = editor.ColumnToX (line, loc.Column) - editor.HAdjustment.Value + editor.TextViewMargin.XOffset + editor.TextViewMargin.TextStartPosition; cr.Rectangle (Math.Floor (x), Math.Floor (metrics.LineYRenderStartPosition) + (line == editor.GetLineByOffset (startOffset) ? editor.LineHeight - tagMarkerHeight : 0), tagMarkerWidth, tagMarkerHeight); - cr.SetSourceColor ((HslColor.Brightness (SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.Background)) < 0.5 ? Ide.Gui.Styles.Editor.SmartTagMarkerColorDark : Ide.Gui.Styles.Editor.SmartTagMarkerColorLight).ToCairoColor ()); + cr.SetSourceColor ((HslColor.Brightness (SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.Background)) < 0.5 ? Ide.Gui.Styles.Editor.SmartTagMarkerColorDark : Ide.Gui.Styles.Editor.SmartTagMarkerColorLight).ToCairoColor ()); cr.Fill (); } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/UsageSegmentMarker.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/UsageSegmentMarker.cs index 5f3ea7d8dd..20ef2e0abb 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/UsageSegmentMarker.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/UsageSegmentMarker.cs @@ -83,11 +83,11 @@ namespace MonoDevelop.SourceEditor if ((usage.UsageType & ReferenceUsageType.Write) == ReferenceUsageType.Write || (usage.UsageType & ReferenceUsageType.Declariton) == ReferenceUsageType.Declariton) { - colorStyle = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.ChangingUsagesRectangle); + colorStyle = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.ChangingUsagesRectangle); if (colorStyle.Alpha == 0.0) - colorStyle = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.UsagesRectangle); + colorStyle = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.UsagesRectangle); } else { - colorStyle = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.UsagesRectangle); + colorStyle = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.UsagesRectangle); } using (var lg = new LinearGradient (@from + 1, y + 1.5, to , y + editor.LineHeight - 1)) { diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs index 8698feef0a..267a8d9ca5 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs @@ -64,7 +64,7 @@ namespace Mono.TextEditor if (mimeType != value) { lock (this) { mimeType = value; - var def = SyntaxModeService.GetSyntaxHighlightingDefinition (FileName, value); + var def = SyntaxHighlightingService.GetSyntaxHighlightingDefinition (FileName, value); if (def != null) { SyntaxMode = new SyntaxHighlighting (def, this); } else { diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorData.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorData.cs index c999166bfa..4525f61e89 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorData.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorData.cs @@ -329,7 +329,7 @@ namespace Mono.TextEditor MonoDevelop.Ide.Editor.Highlighting.EditorTheme colorStyle; internal MonoDevelop.Ide.Editor.Highlighting.EditorTheme ColorStyle { get { - return colorStyle ?? SyntaxModeService.DefaultColorStyle; + return colorStyle ?? SyntaxHighlightingService.DefaultColorStyle; } set { colorStyle = value; @@ -338,7 +338,7 @@ namespace Mono.TextEditor internal MonoDevelop.Ide.Editor.Highlighting.EditorTheme EditorTheme { get { - return MonoDevelop.Ide.Editor.Highlighting.SyntaxModeService.GetEditorTheme (Options.EditorThemeName); + return MonoDevelop.Ide.Editor.Highlighting.SyntaxHighlightingService.GetEditorTheme (Options.EditorThemeName); } } @@ -376,7 +376,7 @@ namespace Mono.TextEditor public string GetMarkup (int offset, int length, bool removeIndent, bool useColors = true, bool replaceTabs = true, bool fitIdeStyle = false) { var mode = Document.SyntaxMode; - var style = fitIdeStyle ? SyntaxModeService.GetEditorTheme(Parent.GetIdeColorStyleName()) : ColorStyle; + var style = fitIdeStyle ? SyntaxHighlightingService.GetEditorTheme(Parent.GetIdeColorStyleName()) : ColorStyle; if (style == null) { var str = Document.GetTextAt (offset, length); diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorOptions.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorOptions.cs index 43da0af33c..977aa86817 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorOptions.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextEditorOptions.cs @@ -570,7 +570,7 @@ namespace Mono.TextEditor public virtual MonoDevelop.Ide.Editor.Highlighting.EditorTheme GetEditorTheme () { - return SyntaxModeService.GetEditorTheme (EditorThemeName); + return SyntaxHighlightingService.GetEditorTheme (EditorThemeName); } public virtual void CopyFrom (TextEditorOptions other) diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextLinkEditMode.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextLinkEditMode.cs index bf05d1d5ee..cb8959b6d7 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextLinkEditMode.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/TextLinkEditMode.cs @@ -570,11 +570,11 @@ namespace Mono.TextEditor if (segment.Equals (link.PrimaryLink)) { - fillGc = SyntaxModeService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.PrimaryTemplateHighlighted2 : ThemeSettingColors.PrimaryTemplate2); - rectangleGc = SyntaxModeService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.PrimaryTemplateHighlighted2 : ThemeSettingColors.PrimaryTemplate2); + fillGc = SyntaxHighlightingService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.PrimaryTemplateHighlighted2 : ThemeSettingColors.PrimaryTemplate2); + rectangleGc = SyntaxHighlightingService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.PrimaryTemplateHighlighted2 : ThemeSettingColors.PrimaryTemplate2); } else { - fillGc = SyntaxModeService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.SecondaryTemplateHighlighted2 : ThemeSettingColors.SecondaryTemplate2); - rectangleGc = SyntaxModeService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.SecondaryTemplateHighlighted : ThemeSettingColors.SecondaryTemplate); + fillGc = SyntaxHighlightingService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.SecondaryTemplateHighlighted2 : ThemeSettingColors.SecondaryTemplate2); + rectangleGc = SyntaxHighlightingService.GetColor (editor.EditorTheme, isPrimaryHighlighted ? ThemeSettingColors.SecondaryTemplateHighlighted : ThemeSettingColors.SecondaryTemplate); } // Draw segment @@ -610,8 +610,8 @@ namespace Mono.TextEditor var width = metrics.Width; cr.Rectangle (metrics.X, metrics.Y, metrics.Width, metrics.Height); - var lineNumberGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbers); - cr.SetSourceColor (editor.Caret.Line == metrics.LineNumber ? SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.LineHighlight) : lineNumberGC); + var lineNumberGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbers); + cr.SetSourceColor (editor.Caret.Line == metrics.LineNumber ? SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.LineHighlight) : lineNumberGC); cr.Fill (); return true; @@ -620,7 +620,7 @@ namespace Mono.TextEditor public override void DrawForeground (MonoTextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics) { var width = metrics.Width; - var lineNumberBgGC = SyntaxModeService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbersBackground); + var lineNumberBgGC = SyntaxHighlightingService.GetColor (editor.EditorTheme, ThemeSettingColors.LineNumbersBackground); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindowTheme.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindowTheme.cs index 5fc8899c8c..e12ab3cdc9 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindowTheme.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindowTheme.cs @@ -245,10 +245,10 @@ namespace MonoDevelop.Components public void SetSchemeColors (EditorTheme scheme) { ; - BackgroundColor = SyntaxModeService.GetColor (scheme, ThemeSettingColors.TooltipBackground); - PagerTextColor = SyntaxModeService.GetColor (scheme, ThemeSettingColors.TooltipPagerText); - PagerBackgroundColor = SyntaxModeService.GetColor (scheme, ThemeSettingColors.TooltipPager); - PagerTriangleColor = SyntaxModeService.GetColor (scheme, ThemeSettingColors.TooltipPagerTriangle); + BackgroundColor = SyntaxHighlightingService.GetColor (scheme, ThemeSettingColors.TooltipBackground); + PagerTextColor = SyntaxHighlightingService.GetColor (scheme, ThemeSettingColors.TooltipPagerText); + PagerBackgroundColor = SyntaxHighlightingService.GetColor (scheme, ThemeSettingColors.TooltipPager); + PagerTriangleColor = SyntaxHighlightingService.GetColor (scheme, ThemeSettingColors.TooltipPagerTriangle); } void EmitRedrawNeeded () diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs index fadb1c2829..12308fa426 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs @@ -836,7 +836,7 @@ namespace MonoDevelop.Ide.CodeCompletion } const int spacing = 2; - EditorTheme EditorTheme => SyntaxModeService.GetEditorTheme (IdeApp.Preferences.ColorScheme); + EditorTheme EditorTheme => SyntaxHighlightingService.GetEditorTheme (IdeApp.Preferences.ColorScheme); delegate void CategoryAction (Category category, int yPos); delegate bool ItemAction (Category curCategory, int item, int itemIndex, int yPos); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs index b363f6af71..eaf4a0c869 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs @@ -106,9 +106,9 @@ namespace MonoDevelop.Ide.CodeCompletion void UpdateStyle () { - var scheme = SyntaxModeService.GetEditorTheme (IdeApp.Preferences.ColorScheme); + var scheme = SyntaxHighlightingService.GetEditorTheme (IdeApp.Preferences.ColorScheme); if (!scheme.FitsIdeTheme (IdeApp.Preferences.UserInterfaceTheme)) - scheme = SyntaxModeService.GetDefaultColorStyle (IdeApp.Preferences.UserInterfaceTheme); + scheme = SyntaxHighlightingService.GetDefaultColorStyle (IdeApp.Preferences.UserInterfaceTheme); Theme.SetSchemeColors (scheme); Theme.Font = FontService.SansFont.CopyModified (Styles.FontScale11); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs index 5348918382..a72c533c40 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs @@ -256,9 +256,9 @@ namespace MonoDevelop.Ide.CodeCompletion internal void SetDefaultScheme () { - var scheme = SyntaxModeService.GetEditorTheme (IdeApp.Preferences.ColorScheme); + var scheme = SyntaxHighlightingService.GetEditorTheme (IdeApp.Preferences.ColorScheme); if (!scheme.FitsIdeTheme (IdeApp.Preferences.UserInterfaceTheme)) - scheme = SyntaxModeService.GetDefaultColorStyle (IdeApp.Preferences.UserInterfaceTheme); + scheme = SyntaxHighlightingService.GetDefaultColorStyle (IdeApp.Preferences.UserInterfaceTheme); Theme.SetSchemeColors (scheme); foreColor = Styles.PopoverWindow.DefaultTextColor.ToCairoColor (); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/SyntaxModeService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/SyntaxHighlightingService.cs index 8752b45b0f..5362c22ea7 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/SyntaxModeService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/SyntaxHighlightingService.cs @@ -41,7 +41,7 @@ using MonoDevelop.Components; namespace MonoDevelop.Ide.Editor.Highlighting { - public static class SyntaxModeService + public static class SyntaxHighlightingService { static Dictionary<string, EditorTheme> styles = new Dictionary<string, EditorTheme> (); static Dictionary<string, IStreamProvider> styleLookup = new Dictionary<string, IStreamProvider> (); @@ -319,9 +319,9 @@ namespace MonoDevelop.Ide.Editor.Highlighting } } - static SyntaxModeService () + static SyntaxHighlightingService () { - LoadStylesAndModes (typeof (SyntaxModeService).Assembly); + LoadStylesAndModes (typeof (SyntaxHighlightingService).Assembly); var textEditorAssembly = Assembly.Load ("MonoDevelop.SourceEditor"); if (textEditorAssembly != null) { LoadStylesAndModes (textEditorAssembly); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/TemplateExtensionNodeLoader.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/TemplateExtensionNodeLoader.cs index 859686c49b..3ca247fb40 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/TemplateExtensionNodeLoader.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/TemplateExtensionNodeLoader.cs @@ -46,9 +46,9 @@ namespace MonoDevelop.Ide.Editor.Highlighting { TemplateCodon codon = (TemplateCodon)args.ExtensionNode; if (args.Change == ExtensionChange.Add) { - SyntaxModeService.AddStyle (codon); + SyntaxHighlightingService.AddStyle (codon); } else { - SyntaxModeService.RemoveStyle (codon); + SyntaxHighlightingService.RemoveStyle (codon); } } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/ITextEditorOptions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/ITextEditorOptions.cs index 234f1c7f32..bcabd79f88 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/ITextEditorOptions.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/ITextEditorOptions.cs @@ -112,7 +112,7 @@ namespace MonoDevelop.Ide.Editor { if (options == null) throw new ArgumentNullException ("options"); - return SyntaxModeService.GetEditorTheme (options.EditorTheme); + return SyntaxHighlightingService.GetEditorTheme (options.EditorTheme); } /// <summary> diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditorDisplayBinding.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditorDisplayBinding.cs index 5c626bbdab..9cea791cfc 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditorDisplayBinding.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditorDisplayBinding.cs @@ -73,7 +73,7 @@ namespace MonoDevelop.Ide.Editor } } if (success) - SyntaxModeService.LoadStylesAndModes (SyntaxModePath); + SyntaxHighlightingService.LoadStylesAndModes (SyntaxModePath); } public string Name { diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs index 4834d56979..6b7b9aa8ba 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs @@ -87,7 +87,7 @@ namespace MonoDevelop.Ide.FindInFiles (ReferenceUsageType & ReferenceUsageType.Declariton) != 0 ? ThemeSettingColors.ChangingUsagesRectangle : ThemeSettingColors.UsagesRectangle; - return SyntaxModeService.GetColor (style, key); + return SyntaxHighlightingService.GetColor (style, key); } } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs index e641efe5f2..0b603f5ad3 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs @@ -79,7 +79,7 @@ namespace MonoDevelop.Ide.FindInFiles public virtual Components.HslColor GetBackgroundMarkerColor (EditorTheme style) { - return SyntaxModeService.GetColor (style, ThemeSettingColors.FindHighlight);; + return SyntaxHighlightingService.GetColor (style, ThemeSettingColors.FindHighlight);; } } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs index d34b296d18..241bdff7d3 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs @@ -216,9 +216,9 @@ namespace MonoDevelop.Ide.FindInFiles void UpdateStyles (object sender = null, EventArgs e = null) { - highlightStyle = SyntaxModeService.GetEditorTheme (IdeApp.Preferences.ColorScheme); + highlightStyle = SyntaxHighlightingService.GetEditorTheme (IdeApp.Preferences.ColorScheme); if (!highlightStyle.FitsIdeTheme (IdeApp.Preferences.UserInterfaceTheme)) - highlightStyle = SyntaxModeService.GetDefaultColorStyle (Ide.IdeApp.Preferences.UserInterfaceTheme); + highlightStyle = SyntaxHighlightingService.GetDefaultColorStyle (Ide.IdeApp.Preferences.UserInterfaceTheme); if (markupCache != null) markupCache = new List<Tuple<SearchResult, string>> (); @@ -601,10 +601,10 @@ namespace MonoDevelop.Ide.FindInFiles var searchColor = searchResult.GetBackgroundMarkerColor (highlightStyle); double b1 = HslColor.Brightness (searchColor); - double b2 = HslColor.Brightness (AdjustColor (Style.Base (StateType.Normal), SyntaxModeService.GetColor (highlightStyle, ThemeSettingColors.Foreground))); + double b2 = HslColor.Brightness (AdjustColor (Style.Base (StateType.Normal), SyntaxHighlightingService.GetColor (highlightStyle, ThemeSettingColors.Foreground))); double delta = Math.Abs (b1 - b2); if (delta < 0.1) { - var color1 = SyntaxModeService.GetColor (highlightStyle, ThemeSettingColors.FindHighlight); + var color1 = SyntaxHighlightingService.GetColor (highlightStyle, ThemeSettingColors.FindHighlight); if (color1.L + 0.5 > 1.0) { color1.L -= 0.5; } else { diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj index 7aab83ec9e..e31361b553 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj @@ -8358,7 +8358,7 @@ <Compile Include="MonoDevelop.Ide.Editor.Extension\SelectionSurroundingProvider.cs" /> <Compile Include="MonoDevelop.Ide.Editor.Extension\TextPasteHandler.cs" /> <Compile Include="MonoDevelop.Ide.Editor\DocumentLocation.cs" /> - <Compile Include="MonoDevelop.Ide.Editor.Highlighting\SyntaxModeService.cs" /> + <Compile Include="MonoDevelop.Ide.Editor.Highlighting\SyntaxHighlightingService.cs" /> <Compile Include="MonoDevelop.Ide.Editor.Highlighting\OldFormat.cs" /> <Compile Include="MonoDevelop.Ide.Editor.Highlighting\ColorDescriptionAttribute.cs" /> <Compile Include="MonoDevelop.Ide.Editor.Highlighting\TemplateCodon.cs" /> diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs index ea3a74caac..33c29d0d0a 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs @@ -214,13 +214,13 @@ namespace MonoDevelop.Ide protected override string OnGetValue () { var style = base.OnGetValue (); - if (SyntaxModeService.Styles.Contains (style)) + if (SyntaxHighlightingService.Styles.Contains (style)) return style; - var defaultStyle = SyntaxModeService.GetDefaultColorStyleName (); + var defaultStyle = SyntaxHighlightingService.GetDefaultColorStyleName (); LoggingService.LogWarning ("Highlighting Theme \"{0}\" not found, using default \"{1}\" instead", style, defaultStyle); Value = defaultStyle; - return SyntaxModeService.GetDefaultColorStyleName (); + return SyntaxHighlightingService.GetDefaultColorStyleName (); } } } |