I plan to develop an extension for Visual Studio that manipulates the document bookmarks. Basically, I want to be able to list the existing bookmarks, to create new ones and to remove any of the existing ones, for the whole solution.
The only place where I have found bookmark manipulation capabilities is the TextSelection interface: it has ClearBookmark
, SetBookmark
, PreviousBookmark
and NextBookmark
methods; but these don't seem to be what I need, as they work for individual text selections only.
So, is there any other (solution wide) way to manipulate document bookmarks from within a Visual Studio extension? Or am I missing something and these existing methods actually provide the functionality that I need?
The bookmark information stored in .suo file. So you could read the .suo file with IVsPersistSolutionOpts Interface.
It contains ReadUserOptions(IStream, String), SaveUserOptions(IVsSolutionPersistence) and WriteUserOptions(IStream, String) methods. You could use them to manage the bookmarks in your solution.