Hello,
I am creating a new custom WPF Editor in VS2010 and I noticed that my Replace in selection code doesn't seem to be working as expected. When I have text selected and then search for text using the find dialog. It seems that my selection's bounds are not stored by Visual Studio and that it just continuously loops through the documents text. Is there an interface method that is called which I can store the selection points which are then later restored by Visual Studio's API? I've set break points and did quite a bit of searching and didn't see anything like this. I also have this behavior when I do replace in selection, it just replaces everything in the document.
[ComSourceInterfaces(typeof (IVsTextViewEvents))] [ComVisible(true)] public abstract class EditorPaneBase : WindowPane, IPersistFileFormat, //to Enable persistence functionality for document data. IVsPersistDocData2, //to Enable persistence functionality for document data. IVsFileChangeEvents, //to notify the client when file changes on disk IVsDocDataFileChangeControl, //to Determine whether changes to files made outside of the editor should be ignored IVsFileBackup, //to support backup of files. Visual Studio File Recovery backs up all objects in the Running Document Table that support IVsFileBackup and have unsaved changes. IVsStatusbarUser, //support updating the status bar IVsFindTarget, //to implement find and replace capabilities within the editor IVsTextImage, //to support find and replace in a text image IVsTextSpanSet, //needed for Find and Replace to work appropriately IVsTextView, //Manages the text view of an editor window. Contains methods to manage the text view. The view is essentially the editor window shown in the UI. IVsCodeWindow, //needed for Find and Replace to work appropriately IVsTextLines, //needed for Find and Replace to work appropriately IVsToolboxUser, //Sends notification about Toolbox items to the owner of these items IExtensibleObject, //so we can get the atuomation object Document
Thanks
-Blake Niemyjski