public SelectionUIProperties(MultiSelectionBrokerFactory factory, MultiSelectionBroker broker, SelectionTransformer transformer) { _factory = factory; _broker = broker; _options = _factory.EditorOptionsFactoryService.GetOptions(_broker.TextView); _transformer = transformer; }
public MultiSelectionBroker(ITextView textView, MultiSelectionBrokerFactory factory) { Factory = factory; _textView = textView; if (textView.ToString().Contains("ExtensibleTextEditor")) { IsOldEditor = true; } _currentSnapshot = _textView.TextSnapshot; var documentStart = new VirtualSnapshotPoint(_textView.TextSnapshot, 0); _primaryTransformer = new SelectionTransformer(this, new Selection(documentStart)); _selectionTransformers.Add(_primaryTransformer); // Ignore normal text structure navigators and take the plain text version to keep ownership of word navigation. _textStructureNavigator = Factory.TextStructureNavigatorSelectorService.GetTextStructureNavigator(_textView.TextViewModel.EditBuffer); _textView.LayoutChanged += OnTextViewLayoutChanged; _textView.Closed += OnTextViewClosed; }