public void ShowButton()
 {
     if (dialog != null)
     {
         dialog.Destroyed -= Dialog_Destroyed;
         dialog.Destroy();
         dialog = null;
     }
     if (button == null)
     {
         button = new ExceptionCaughtButton(ex, this, File, Line);
         TextEditorService.RegisterExtension(button);
         button.ScrollToView();
     }
     if (miniButton != null)
     {
         miniButton.Dispose();
         miniButton = null;
     }
 }
Ejemplo n.º 2
0
        public static void ShowExceptionCaughtDialog()
        {
            EvaluationOptions ops = session.EvaluationOptions.Clone();

            ops.MemberEvaluationTimeout = 0;
            ops.EvaluationTimeout       = 0;
            ops.EllipsizeStrings        = false;

            ExceptionInfo val = CurrentFrame.GetException(ops);

            if (val != null)
            {
                exceptionDialog = new ExceptionCaughtDialog(val);
                exceptionDialog.TransientFor = IdeApp.Workbench.RootWindow;
                MessageService.PlaceDialog(exceptionDialog, IdeApp.Workbench.RootWindow);
                exceptionDialog.Destroyed += (o, args) => {
                    exceptionDialog = null;
                };
                exceptionDialog.Show();
            }
        }
Ejemplo n.º 3
0
 public void Dispose()
 {
     if (dialog != null)
     {
         dialog.Destroy();
         dialog = null;
     }
     if (button != null)
     {
         button.Dispose();
         button = null;
     }
     if (miniButton != null)
     {
         miniButton.Dispose();
         miniButton = null;
     }
     if (Closed != null)
     {
         Closed(this, EventArgs.Empty);
     }
 }
Ejemplo n.º 4
0
		public static void ShowExceptionCaughtDialog ()
		{
			ExceptionInfo val = CurrentFrame.GetException ();
			if (val != null) {
				ExceptionCaughtDialog dlg = new ExceptionCaughtDialog (val);
				dlg.TransientFor = IdeApp.Workbench.RootWindow;
				MessageService.PlaceDialog (dlg, IdeApp.Workbench.RootWindow);
				dlg.Show ();
			}
		}
Ejemplo n.º 5
0
		public void Dispose ()
		{
			if (dialog != null) {
				dialog.Destroy ();
				dialog = null;
			}
			if (button != null) {
				button.Dispose ();
				button = null;
			}
			if (miniButton != null) {
				miniButton.Dispose ();
				miniButton = null;
			}
			if (Closed != null)
				Closed (this, EventArgs.Empty);
		}
Ejemplo n.º 6
0
		public void ShowMiniButton ()
		{
			if (dialog != null) {
				dialog.Destroy ();
				dialog = null;
			}
			if (button != null) {
				button.Dispose ();
				button = null;
			}
			if (miniButton == null) {
				miniButton = new ExceptionCaughtMiniButton (this, File, Line);
				TextEditorService.RegisterExtension (miniButton);
			}
		}
Ejemplo n.º 7
0
		public void ShowDialog ()
		{
			if (dialog == null) {
				dialog = new ExceptionCaughtDialog (ex, this);
				MessageService.ShowCustomDialog (dialog, IdeApp.Workbench.RootWindow);
				dialog = null;
			}
		}
Ejemplo n.º 8
0
		static void Cleanup ()
		{
			if (oldLayout != null) {
				string layout = oldLayout;
				oldLayout = null;
				// Dispatch asynchronously to avoid start/stop races
				DispatchService.GuiSyncDispatch (delegate {
					if (IdeApp.Workbench.CurrentLayout == "Debug")
						IdeApp.Workbench.CurrentLayout = layout;
				});
			}
			
			currentBacktrace = null;
			
			if (!IsDebugging)
				return;
			
			if (exceptionDialog != null) {
				exceptionDialog.Destroy ();
				exceptionDialog = null;
			}
			
			if (busyStatusIcon != null) {
				busyStatusIcon.Dispose ();
				busyStatusIcon = null;
			}
			
			session.TargetEvent -= OnTargetEvent;
			session.TargetStarted -= OnStarted;
			session.OutputWriter = null;
			session.LogWriter = null;
			session.BusyStateChanged -= OnBusyStateChanged;
			session.TypeResolverHandler = null;
			session.BreakpointTraceHandler = null;
			session.GetExpressionEvaluator = null;
			
			// Dispose the session at the end, since it may take a while.
			DebuggerSession oldSession = session;
			session = null;
			
			DispatchService.GuiDispatch (delegate {
				if (StoppedEvent != null)
					StoppedEvent (null, new EventArgs ());
			});
			
			if (console != null) {
				console.CancelRequested -= OnCancelRequested;
				console.Dispose ();
				console = null;
			}
			
			DispatchService.GuiDispatch (delegate {
				NotifyCallStackChanged ();
				NotifyCurrentFrameChanged ();
				NotifyLocationChanged ();
			});
			
			if (oldSession != null) {
				oldSession.BusyStateChanged -= OnBusyStateChanged;
				oldSession.Dispose ();
			}
		}
Ejemplo n.º 9
0
		public static void ShowExceptionCaughtDialog ()
		{
			EvaluationOptions ops = session.EvaluationOptions.Clone ();
			ops.MemberEvaluationTimeout = 0;
			ops.EvaluationTimeout = 0;
			ops.EllipsizeStrings = false;
			
			ExceptionInfo val = CurrentFrame.GetException (ops);
			if (val != null) {
				exceptionDialog = new ExceptionCaughtDialog (val);
				exceptionDialog.TransientFor = IdeApp.Workbench.RootWindow;
				MessageService.PlaceDialog (exceptionDialog, IdeApp.Workbench.RootWindow);
				exceptionDialog.Destroyed += (o, args) => {
					exceptionDialog = null;
				};
				exceptionDialog.Show ();
			}
		}
Ejemplo n.º 10
0
		public void ShowButton ()
		{
			if (dialog != null) {
				dialog.Destroyed -= Dialog_Destroyed;
				dialog.Destroy ();
				dialog = null;
			}
			if (button == null) {
				button = new ExceptionCaughtButton (ex, this, File, Line);
				TextEditorService.RegisterExtension (button);
				button.ScrollToView ();
			}
			if (miniButton != null) {
				miniButton.Dispose ();
				miniButton = null;
			}
		}
Ejemplo n.º 11
0
		void Dialog_Destroyed (object sender, EventArgs e)
		{
			if (dialog != null) {
				dialog.Destroyed -= Dialog_Destroyed;
				dialog = null;
			}
		}
Ejemplo n.º 12
0
		public void ShowDialog ()
		{
			if (dialog == null) {
				dialog = new ExceptionCaughtDialog (ex, this);
				IdeApp.CommandService.RegisterTopWindow (dialog);
				dialog.TransientFor = IdeApp.Workbench.RootWindow;
				dialog.Show ();
				MessageService.PlaceDialog (dialog, IdeApp.Workbench.RootWindow);
				dialog.Destroyed += Dialog_Destroyed;;
			}
		}
Ejemplo n.º 13
0
		public static void ShowExceptionCaughtDialog ()
		{
			EvaluationOptions ops = session.EvaluationOptions.Clone ();
			ops.EllipsizeStrings = false;
			
			ExceptionInfo val = CurrentFrame.GetException (ops);
			if (val != null) {
				ExceptionCaughtDialog dlg = new ExceptionCaughtDialog (val);
				dlg.TransientFor = IdeApp.Workbench.RootWindow;
				MessageService.PlaceDialog (dlg, IdeApp.Workbench.RootWindow);
				dlg.Show ();
			}
		}
Ejemplo n.º 14
0
        static void Cleanup()
        {
            if (oldLayout != null)
            {
                string layout = oldLayout;
                oldLayout = null;
                // Dispatch asynchronously to avoid start/stop races
                DispatchService.GuiSyncDispatch(delegate {
                    if (IdeApp.Workbench.CurrentLayout == "Debug")
                    {
                        IdeApp.Workbench.CurrentLayout = layout;
                    }
                });
            }

            currentBacktrace = null;

            if (!IsDebugging)
            {
                return;
            }

            if (exceptionDialog != null)
            {
                exceptionDialog.Destroy();
                exceptionDialog = null;
            }

            if (busyStatusIcon != null)
            {
                busyStatusIcon.Dispose();
                busyStatusIcon = null;
            }

            session.TargetEvent           -= OnTargetEvent;
            session.TargetStarted         -= OnStarted;
            session.OutputWriter           = null;
            session.LogWriter              = null;
            session.BusyStateChanged      -= OnBusyStateChanged;
            session.TypeResolverHandler    = null;
            session.BreakpointTraceHandler = null;
            session.GetExpressionEvaluator = null;
            console.CancelRequested       -= OnCancelRequested;

            // Dispose the session at the end, since it may take a while.
            DebuggerSession oldSession = session;

            session = null;

            DispatchService.GuiDispatch(delegate {
                if (StoppedEvent != null)
                {
                    StoppedEvent(null, new EventArgs());
                }
            });

            if (console != null)
            {
                console.Dispose();
                console = null;
            }

            DispatchService.GuiDispatch(delegate {
                NotifyCallStackChanged();
                NotifyCurrentFrameChanged();
                NotifyLocationChanged();
            });

            if (oldSession != null)
            {
                oldSession.BusyStateChanged -= OnBusyStateChanged;
                oldSession.Dispose();
            }
        }
		public static void ShowExceptionCaughtDialog ()
		{
			ExceptionInfo val = CurrentFrame.GetException ();
			if (val != null) {
				ExceptionCaughtDialog dlg = new ExceptionCaughtDialog (val);
				dlg.Show ();
			}
		}