Bookmarks
LeeMSilver opened this issue · comments
In the current extension model Bookmark
s are accessed/created/deleted via the EditPoint2
Interface in EnvDTE880
.
The new extension model has no need for EditPoint2
due to the use of ITextDocumentEditor
.
My extension uses Bookmark
s in 2 scenarios.
-
One of its commands iterates thru the source-files opened in
VS
and Bookmarks those have a differentnamespace
than the first file checked. -
Code similar to the following pseudo-code:
CompilationUnitSyntax root = ...; EditPoint2 epTop = StartOfDocument(); EditPoint2 epEnd = EndOfDocumentX(); epTop.Delete(epEnd); epTop.Insert(wRoot.ToFullString());
causes all Bookmark
s in the document to be deleted.
The extension does the following to minimize the effect of the deleted Bookmark
s:
a) prior to the above code it saves the line-numbers of all Bookmarked lines
b) following the above code it tries to set Bookmark
s on the saved line-numbers
I'm fairly sure the if the content of ITextDocumentEditor
is completely replaced all existing Bookmark
s in the document will also be deleted.
If by some miracle the above statement is not true, (2) above will no longer be a problem, but (1) still needs to be implemented.
How can I accomplish the above without using EditPoint2
either now or in the future?