internal DifferenceBrushManager(ITextView3 view, IEditorFormatMap formatMap) { _formatMap = formatMap; InitializeBrushes(); _formatMap.FormatMappingChanged += FormatMapChanged; view.Closed += (s, a) => { _formatMap.FormatMappingChanged -= FormatMapChanged; }; }
public BraceCompletionAdornmentService(ITextView3 textView, IEditorFormatMap editorFormatMap) { _textView = textView; _editorFormatMap = editorFormatMap; if (_textView == null) { throw new ArgumentNullException(nameof(textView)); } if (_editorFormatMap == null) { throw new ArgumentNullException(nameof(editorFormatMap)); } _adornmentLayer = _textView.GetXPlatAdornmentLayer(PredefinedAdornmentLayers.BraceCompletion); SetBrush(); RegisterEvents(); }
public static DifferenceBrushManager GetBrushManager(ITextView3 view, IEditorFormatMap formatMap) { return(view.Properties.GetOrCreateSingletonProperty(() => new DifferenceBrushManager(view, formatMap))); }