예제 #1
0
        protected override void Run()
        {
            var doc = IdeApp.Workbench.ActiveDocument;

            try {
                DebuggingService.SetNextStatement(doc.FileName, doc.Editor.CaretLine, doc.Editor.CaretColumn);
            } catch (Exception e) {
                if (e is NotSupportedException || e.InnerException is NotSupportedException)
                {
                    string message;
                    if (e is NotSupportedException)
                    {
                        message = e.Message;
                    }
                    else
                    {
                        message = e.InnerException.Message;
                    }
                    if (message == "Unable to set the next statement. The next statement cannot be set to another function.")
                    {
                        MessageService.ShowError(GettextCatalog.GetString("Unable to set the next statement. The next statement cannot be set to another function."));
                    }
                    else
                    {
                        MessageService.ShowError(GettextCatalog.GetString("Unable to set the next statement to this location."));
                    }
                }
                else
                {
                    throw;
                }
            }
        }
예제 #2
0
        protected override void Run()
        {
            var doc = IdeApp.Workbench.ActiveDocument;

            try {
                DebuggingService.SetNextStatement(doc.FileName, doc.Editor.Caret.Line, doc.Editor.Caret.Column);
            } catch (NotSupportedException) {
                MessageService.ShowError("Unable to set the next statement to this location.");
            }
        }
예제 #3
0
		protected override void Run ()
		{
			var doc = IdeApp.Workbench.ActiveDocument;

			try {
				var (caretLine, caretColumn) = doc.GetContent<ITextView> (true).MDCaretLineAndColumn ();
				DebuggingService.SetNextStatement (doc.FileName, caretLine, caretColumn);
			} catch (Exception e) {
				if (e is NotSupportedException || e.InnerException is NotSupportedException) {
					string message;
					if (e is NotSupportedException)
						message = e.Message;
					else
						message = e.InnerException.Message;
					if (message == "Unable to set the next statement. The next statement cannot be set to another function.")
						MessageService.ShowError (GettextCatalog.GetString ("Unable to set the next statement. The next statement cannot be set to another function."));
					else
						MessageService.ShowError (GettextCatalog.GetString ("Unable to set the next statement to this location."));
				} else {
					throw;
				}
			}
		}