private void AppendElementType([NotNull] IDeclaredElement element, [NotNull] ISubstitution substitution, QualifierDisplays expectedQualifierDisplay, [CanBeNull] string before, [CanBeNull] string after, Context context) { // Use the special type first if available (eg Razor helper), colorize it as a keyword string specialTypeString = CSharpModificationUtil.GetSpecialElementType(_specialTypeStyle, element, substitution); if (!specialTypeString.IsEmpty()) { AppendText(before, null); AppendText(specialTypeString, _highlighterIdProvider.Keyword); AppendText(after, null); return; } IType elementType = GetElementType(element, substitution); if (elementType == null) { return; } AppendText(before, null); AppendTypeWithoutModule(elementType, expectedQualifierDisplay, context); AppendText(after, null); }
private void AppendElementType([NotNull] IDeclaredElement element, [NotNull] ISubstitution substitution, NamespaceDisplays namespaceDisplays, [CanBeNull] string before, [CanBeNull] string after) { // Use the special type first if available (eg Razor helper), colorize it as a keyword string specialTypeString = CSharpModificationUtil.GetSpecialElementType(_specialTypeStyle, element, substitution); if (!specialTypeString.IsEmpty()) { AppendText(before, null); AppendText(specialTypeString, VsHighlightingAttributeIds.Keyword); AppendText(after, null); return; } IType elementType = GetElementType(element, substitution); if (elementType == null) { return; } AppendText(before, null); AppendType(elementType, namespaceDisplays); AppendText(after, null); }