|
|
|
@ -14,6 +14,7 @@ namespace ICSharpCode.SharpDevelop.Debugging
@@ -14,6 +14,7 @@ namespace ICSharpCode.SharpDevelop.Debugging
|
|
|
|
|
{ |
|
|
|
|
public class CurrentLineBookmark : SDMarkerBookmark |
|
|
|
|
{ |
|
|
|
|
static object syncObject = new object(); |
|
|
|
|
static CurrentLineBookmark instance; |
|
|
|
|
|
|
|
|
|
static int startLine; |
|
|
|
@ -27,14 +28,15 @@ namespace ICSharpCode.SharpDevelop.Debugging
@@ -27,14 +28,15 @@ namespace ICSharpCode.SharpDevelop.Debugging
|
|
|
|
|
if (tecp != null) { |
|
|
|
|
SetPosition(tecp.TextEditor.FileName, tecp.TextEditor.Document, makerStartLine, makerStartColumn, makerEndLine, makerEndColumn); |
|
|
|
|
} else { |
|
|
|
|
if (makerStartLine == 0) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
dynamic codeView = viewContent.Control; |
|
|
|
|
SetPosition(null, codeView.TextEditor.Document as IDocument, makerStartLine, makerStartColumn, makerEndLine, makerEndColumn); |
|
|
|
|
codeView.IconBarManager.Bookmarks.Add(CurrentLineBookmark.instance); |
|
|
|
|
codeView.UnfoldAndScroll(makerStartLine); |
|
|
|
|
CurrentLineBookmark.instance.Document = codeView.TextEditor.Document as IDocument; |
|
|
|
|
lock (syncObject) { |
|
|
|
|
dynamic codeView = viewContent.Control; |
|
|
|
|
var document = codeView.TextEditor.Document as IDocument; |
|
|
|
|
SetPosition(null, document, makerStartLine, makerStartColumn, makerEndLine, makerEndColumn); |
|
|
|
|
codeView.IconBarManager.Bookmarks.Add(CurrentLineBookmark.instance); |
|
|
|
|
codeView.UnfoldAndScroll(makerStartLine); |
|
|
|
|
if (document != null) |
|
|
|
|
CurrentLineBookmark.instance.Document = document; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|