提交 291eca24 编写于 作者: C CyrusNajmabadi 提交者: GitHub

Merge pull request #15507 from CyrusNajmabadi/suggestionScrollBar

Update our code so that Suggestions show up in the scroll bar on the right. 
......@@ -22,7 +22,8 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.Diagnostics
[ContentType(ContentTypeNames.RoslynContentType)]
[ContentType(ContentTypeNames.XamlContentType)]
[TagType(typeof(SuggestionTag))]
internal partial class DiagnosticsSuggestionTaggerProvider :
[TagType(typeof(IOverviewMarkTag))]
internal partial class DiagnosticsSuggestionTaggerProvider :
AbstractDiagnosticsAdornmentTaggerProvider<SuggestionTag>
{
private static readonly IEnumerable<Option<bool>> s_tagSourceOptions =
......@@ -69,7 +70,7 @@ protected internal override bool IncludeDiagnostic(DiagnosticData diagnostic)
protected override SuggestionTag CreateTag(DiagnosticData diagnostic)
{
lock(_suggestionTagGate)
lock (_suggestionTagGate)
{
return _suggestionTag;
}
......
......@@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis.Editor.Implementation.Adornments;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Tagging;
using Microsoft.VisualStudio.Utilities;
namespace Microsoft.CodeAnalysis.Editor.Implementation.Diagnostics
......@@ -20,8 +21,8 @@ internal sealed class SuggestionTagFormat : EditorFormatDefinition
public SuggestionTagFormat()
{
this.BackgroundColor = Color.FromArgb(200, 0xA5, 0xA5, 0xA5);
this.ForegroundColor = Color.FromArgb(200, 0xA5, 0xA5, 0xA5);
this.BackgroundCustomizable = false;
this.DisplayName = EditorFeaturesResources.Suggestion_ellipses;
}
}
......@@ -29,10 +30,12 @@ public SuggestionTagFormat()
/// <summary>
/// Tag that specifies line separator.
/// </summary>
internal class SuggestionTag : GraphicsTag
internal class SuggestionTag : GraphicsTag, IOverviewMarkTag
{
private Pen _graphicsTagPen;
public string MarkKindName => SuggestionTagFormat.ResourceName;
public SuggestionTag(IEditorFormatMap editorFormatMap)
: base(editorFormatMap)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册