Exemple #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;
            }
        }
Exemple #2
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
                });
            }
        }