Esempio n. 1
0
        public PinnedWatchAdornmentManager(ICocoaViewFactory cocoaViewFactory, ICocoaTextView textView)
        {
            path = textView.TextBuffer.GetFilePathOrNull();

            if (path == null)
            {
                return;
            }

            DebuggingService.PinnedWatches.WatchAdded   += OnWatchAdded;
            DebuggingService.PinnedWatches.WatchChanged += OnWatchChanged;
            DebuggingService.PinnedWatches.WatchRemoved += OnWatchRemoved;
            DebuggingService.DebugSessionStarted        += OnDebugSessionStarted;
            DebuggingService.StoppedEvent += OnDebuggingSessionStopped;

            this.layer            = textView.GetXPlatAdornmentLayer("PinnedWatch");
            this.cocoaViewFactory = cocoaViewFactory;
            this.textView         = textView;

            //this.textView.LayoutChanged += OnTextViewLayoutChanged;

            if (DebuggingService.IsDebugging)
            {
                RenderAllAdornments();
                debugging = true;
            }
        }
Esempio n. 2
0
        public BraceCompletionAdornmentService(ITextView3 textView, IEditorFormatMap editorFormatMap)
        {
            _textView        = textView;
            _editorFormatMap = editorFormatMap;

            if (_textView == null)
            {
                throw new ArgumentNullException(nameof(textView));
            }
            if (_editorFormatMap == null)
            {
                throw new ArgumentNullException(nameof(editorFormatMap));
            }

            _adornmentLayer = _textView.GetXPlatAdornmentLayer(PredefinedAdornmentLayers.BraceCompletion);

            SetBrush();
            RegisterEvents();
        }
Esempio n. 3
0
        public ExceptionCaughtAdornmentManager(ICocoaViewFactory cocoaViewFactory, ICocoaTextView textView)
        {
            filePath = textView.TextBuffer.GetFilePathOrNull();
            if (filePath == null)
            {
                return;
            }

            IdeServices.TextEditorService.FileExtensionAdded   += FileExtensionAdded;
            IdeServices.TextEditorService.FileExtensionRemoved += FileExtensionRemoved;
            _exceptionCaughtLayer = textView.GetXPlatAdornmentLayer("ExceptionCaught");

            this.cocoaViewFactory = cocoaViewFactory;

            this.textView = textView;
            this.textView.LayoutChanged += TextView_LayoutChanged;

            foreach (var ext in IdeServices.TextEditorService.GetFileExtensions(filePath))
            {
                FileExtensionAdded(null, new FileExtensionEventArgs  {
                    Extension = ext
                });
            }
        }