By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,747 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,747 IT Pros & Developers. It's quick & easy.

Find and Replace utility thru DTE.find

P: n/a
I want to find out that if there is a mechanism to find a text inside a C# file and replace it with another string.

I am using DTE to do it, the find proerty does it, the results are getting displayed in a find results window pane , but I m not able to programmatically take the contents of the pane.

DTE.Find.FindWhat = "catch"
DTE.Find.Target = vsFindTarget.vsFindTargetFiles
DTE.Find.MatchCase = False
DTE.Find.MatchWholeWord = False
DTE.Find.MatchInHiddenText = True
DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral
DTE.Find.SearchPath = "Current Project"
DTE.Find.SearchSubfolders = True
DTE.Find.FilesOfType = "*.aspx.cs"
DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResults1
DTE.Find.Action = vsFindAction.vsFindActionFindAll
DTE.Windows.Item(Constants.vsWindowKindFindResults 1).Activate()

I am able to access the caption of that result pane but not the contents of that result pane.

Posted using Newsgroups -
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.