internal DefaultTextViewPrimitive(ITextView textView, IViewPrimitivesFactoryService viewPrimitivesFactory, IBufferPrimitivesFactoryService bufferPrimitivesFactory) { _textView = textView; _viewPrimitivesFactory = viewPrimitivesFactory; _textBuffer = bufferPrimitivesFactory.CreateTextBuffer(textView.TextBuffer); _caret = _viewPrimitivesFactory.CreateCaret(this); _selection = _viewPrimitivesFactory.CreateSelection(this); }
public BufferPrimitives(ITextBuffer textBuffer, IBufferPrimitivesFactoryService bufferPrimitivesFactory) { _textBuffer = bufferPrimitivesFactory.CreateTextBuffer(textBuffer); }