public static InlineParameterNameHintsTag Create(string text, TextFormattingRunProperties format,
                                                  IWpfTextView textView, SnapshotSpan span, SymbolKey key,
                                                  InlineParameterNameHintsTaggerProvider taggerProvider)
 {
     return(new InlineParameterNameHintsTag(CreateElement(text, textView, format), textView,
                                            span, key, taggerProvider));
 }
 public InlineParameterNameHintsTagger(InlineParameterNameHintsTaggerProvider taggerProvider, ITextView textView, ITextBuffer buffer, ITagAggregator <InlineParameterNameHintDataTag> tagAggregator)
 {
     _cache = new List <ITagSpan <IntraTextAdornmentTag> >();
     _threadAffinitizedObject = new ForegroundThreadAffinitizedObject(taggerProvider.ThreadingContext);
     _textView           = textView;
     _buffer             = buffer;
     _tagAggregator      = tagAggregator;
     _formatMap          = taggerProvider.ClassificationFormatMapService.GetClassificationFormatMap(textView);
     _hintClassification = taggerProvider.ClassificationTypeRegistryService.GetClassificationType(InlineParameterNameHintsTag.TagId);
     _formatMap.ClassificationFormatMappingChanged += this.OnClassificationFormatMappingChanged;
     _tagAggregator.TagsChanged += OnTagAggregatorTagsChanged;
 }
        private InlineParameterNameHintsTag(FrameworkElement adornment, ITextView textView, SnapshotSpan span,
                                            SymbolKey key, InlineParameterNameHintsTaggerProvider taggerProvider)
            : base(adornment, removalCallback: null, PositionAffinity.Predecessor)
        {
            _textView           = textView;
            _span               = span;
            _key                = key;
            _streamingPresenter = taggerProvider.StreamingFindUsagesPresenter;
            _threadingContext   = taggerProvider.ThreadingContext;
            _toolTipService     = taggerProvider.ToolTipService;

            // Sets the tooltip to a string so that the tool tip opening event can be triggered
            // Tooltip value does not matter at this point because it immediately gets overwritten by the correct
            // information in the Border_ToolTipOpening event handler
            adornment.ToolTip         = "Quick info";
            adornment.ToolTipOpening += Border_ToolTipOpening;
        }