From 512d4c2de50b7ebde607f5a69a37a5501f4c355f Mon Sep 17 00:00:00 2001 From: Ivan Bondarev Date: Wed, 7 Jun 2023 21:21:05 +0200 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20Linux-=D0=BE=D1=82=D0=BB?= =?UTF-8?q?=D0=B0=D0=B4=D1=87=D0=B8=D0=BA=D0=B5=20(=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B2=20JumpToCurrentLine=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=BD=D0=BE=D1=81=D0=BE=D0=BC=20=D0=BA=D0=BE=D0=B4=D0=B0?= =?UTF-8?q?=20=D0=B2=20Control.Invoke)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IB/Debugger/Debugger.cs | 32 ++++++++++++++++--- .../Workbench/FileOperations.cs | 9 +++++- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs b/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs index bff55cff4..3c3d88221 100644 --- a/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs +++ b/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs @@ -978,13 +978,32 @@ namespace VisualPascalABC private Mono.Debugging.Client.SourceLocation stepin_stmt = null; private bool tab_changed=false; + private delegate void JumpToLineDelegate(int line); + private delegate void JumpToLinePreActionsDelegate(); + private delegate void SetCurrentLineBookmarkDelegate(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn); + + void JumpToLineInvoke(int line) + { + curPage.TextEditor.ActiveTextAreaControl.JumpTo(line, 0); + } + + void JumpToLinePreActionsInvoke() + { + workbench.MainForm.Activate(); + CurrentLineBookmark.Remove();//udalajem zheltyj kursor otladki + } + + void SetCurrentLineBookmarkInvoke(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn) + { + CurrentLineBookmark.SetPosition(fileName, document, makerStartLine, makerStartColumn, makerEndLine, makerEndColumn); + } + /// /// Перейти к следующей строке при отладке /// private void JumpToCurrentLine(bool fromBreakpoint = false) { - workbench.MainForm.Activate(); - CurrentLineBookmark.Remove();//udalajem zheltyj kursor otladki + workbench.MainForm.Invoke(new JumpToLinePreActionsDelegate(JumpToLinePreActionsInvoke)); //System.Threading.Thread.Sleep(70); if (stackFrame != null) { @@ -1030,6 +1049,7 @@ namespace VisualPascalABC { tab_changed = true; curPage = WorkbenchServiceFactory.FileService.OpenFileForDebug(stackFrame.SourceLocation.FileName); + if (curPage == null) { MustDebug = true; @@ -1112,10 +1132,12 @@ namespace VisualPascalABC } } } - //for (int i=0; i