Example #1
0
        public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            IWpfTextView      textView         = editorAdaptersFactoryService.GetWpfTextView(textViewAdapter);
            ITextUndoHistory  undoHistory      = undoHistoryRegistry.RegisterHistory(textView.TextBuffer);
            IEditorOperations editorOperations = editorOperationsFactoryService.GetEditorOperations(textView);
            IEditorOptions    editorOptions    = editorOptionsFactoryService.GetOptions(textView);
            IViewPrimitives   viewPrimitives   = editorPrimitivesFactoryService.GetViewPrimitives(textView);

            if (_telemetrySession == null)
            {
                _telemetrySession = TelemetrySessionForPPT.Create(this.GetType().Assembly);
            }

            // Object will survive since it adds itself to the view's command filter chain
            new CommandFilter(
                textViewAdapter,
                textView,
                htmlBuilderService,
                rtfBuilderService,
                editorOperations,
                undoHistory,
                editorOptions,
                viewPrimitives,
                _telemetrySession);
        }
Example #2
0
        public BreakpointGlyphMouseProcessor(
            ICocoaTextViewHost wpfTextViewHost,
            ICocoaTextViewMargin margin,
            ITagAggregator <IGlyphTag> tagAggregator,
            IViewPrimitives viewPrimitives)
        {
            this.textViewHost       = wpfTextViewHost;
            this.glyphMargin        = margin;
            this.glyphTagAggregator = tagAggregator;
            this.viewPrimitives     = viewPrimitives;

            // Setup the UI
            //TODO:MAC
            //popup = new Popup();
            //popup.IsOpen = false;
            //popup.Visibility = Visibility.Hidden;

            textViewHost.Closed += delegate {
                glyphTagAggregator.Dispose();
                glyphTagAggregator = null;
            };
        }
Example #3
0
        public CommandFilter(
            IVsTextView textView,
            IWpfTextView wpfTextView,
            IHtmlBuilderService htmlBuilderService,
            IRtfBuilderService rtfBuilderService,
            IEditorOperations editorOperations,
            ITextUndoHistory undoHistory,
            IEditorOptions editorOptions,
            IViewPrimitives viewPrimitives,
            ITelemetrySession telemetrySession)
        {
            _htmlBuilderService = htmlBuilderService;
            _rtfBuilderService = rtfBuilderService;
            _undoHistory = undoHistory;
            _textView = wpfTextView;
            _editorOperations = editorOperations;
            _editorOptions = editorOptions;
            _viewPrimitives = viewPrimitives;
            _telemetrySession = telemetrySession;

            textView.AddCommandFilter(this, out _nextCommandTargetInChain);
        }
Example #4
0
        public CommandFilter(
            IVsTextView textView,
            IWpfTextView wpfTextView,
            IHtmlBuilderService htmlBuilderService,
            IRtfBuilderService rtfBuilderService,
            IEditorOperations editorOperations,
            ITextUndoHistory undoHistory,
            IEditorOptions editorOptions,
            IViewPrimitives viewPrimitives,
            ITelemetrySession telemetrySession)
        {
            _htmlBuilderService = htmlBuilderService;
            _rtfBuilderService  = rtfBuilderService;
            _undoHistory        = undoHistory;
            _textView           = wpfTextView;
            _editorOperations   = editorOperations;
            _editorOptions      = editorOptions;
            _viewPrimitives     = viewPrimitives;
            _telemetrySession   = telemetrySession;

            textView.AddCommandFilter(this, out _nextCommandTargetInChain);
        }