protected virtual void Detach(ITextView textView)
        {
            Contract.Requires <ArgumentNullException>(textView != null, "textView");

            DismissAll();

            if (_commandFilter != null)
            {
                _commandFilter.Dispose();
            }

            if (_textView != null)
            {
                _textView.Selection.SelectionChanged -= HandleViewSelectionChanged;
            }

            _textView      = null;
            _commandFilter = null;
        }
        protected virtual void Detach([NotNull] ITextView textView)
        {
            Requires.NotNull(textView, nameof(textView));

            DismissAll();

            if (_commandFilter != null)
            {
                _commandFilter.Dispose();
            }

            if (_textView != null)
            {
                _textView.Selection.SelectionChanged -= HandleViewSelectionChanged;
            }

            _textView      = null;
            _commandFilter = null;
        }