Beispiel #1
0
        public TextView(IVsTextView view)
        {
            if (view == null) throw new ArgumentNullException("view");

            try
            {
                _view = view;
                _buffer = view.GetBuffer();

                _viewEvents = new TextViewEventAdapter(view);
                _textStreamEvents = new TextStreamEventAdapter(Buffer);

                _viewEvents.ScrollChanged += ScrollChangedHandler;
                _viewEvents.GotFocus += new EventHandler<ViewFocusEventArgs>(GotFocusHandler);

                _screenUpdater = new ScreenUpdateManager(this);

                CreateWindow();

                selectionSearcher = new MarkSearcher(-1, this);
                freezer1 = new MarkSearcher(1, this);
                freezer2 = new MarkSearcher(2, this);
                freezer3 = new MarkSearcher(3, this);

                freezers = new List<MarkSearcher>();
                freezers.Add(freezer1);
                freezers.Add(freezer2);
                freezers.Add(freezer3);
            }
            catch (Exception ex)
            {
                Log.Error("Failed to create TextView", ex);
            }
        }
Beispiel #2
0
        public TextView(IVsTextView view)
        {
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }

            try
            {
                _view   = view;
                _buffer = view.GetBuffer();

                _viewEvents       = new TextViewEventAdapter(view);
                _textStreamEvents = new TextStreamEventAdapter(Buffer);

                _viewEvents.ScrollChanged += ScrollChangedHandler;
                _viewEvents.GotFocus      += new EventHandler <ViewFocusEventArgs>(GotFocusHandler);

                _screenUpdater = new ScreenUpdateManager(this);

                CreateWindow();

                selectionSearcher = new MarkSearcher(-1, this);
                freezer1          = new MarkSearcher(1, this);
                freezer2          = new MarkSearcher(2, this);
                freezer3          = new MarkSearcher(3, this);

                freezers = new List <MarkSearcher>();
                freezers.Add(freezer1);
                freezers.Add(freezer2);
                freezers.Add(freezer3);
            }
            catch (Exception ex)
            {
                Log.Error("Failed to create TextView", ex);
            }
        }