Saving and restoring Bookmarks

SyntaxEditor for WPF Forum

Posted 6 years ago by Martin de Jong - Statistics Netherlands
Version: 13.1.0580
Avatar

The goal is implementing bookmarks in an MDI environment. I want to store and reload the bookmarks for all the files of the Solution.

How can i retrieve the linenumbers of the bookmarks?

 

It looks like

var bmManager = MyEditor.Document.IndicatorManager.Bookmarks; 

 

gives only snapshot ids of the lines, not the lines/linenumbers themselves.

Thanks,

Martin

Comments (1)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Martin,

You could do something like this to get position (line/char) data:

foreach (var indicator in editor.Document.IndicatorManager.Bookmarks.GetInstances()) {
	var position = indicator.VersionRange.Translate(editor.Document.CurrentSnapshot).StartPosition;
	// ...
}


Actipro Software Support

The latest build of this product (v2019.1 build 0682) was released 4 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.