jmihalicza
Ketchup Master
   
Hungary
66 Posts |
Posted - Mar 17 2010 : 05:31:38 AM
|
Use case: 1. A certain error message appeared either in a log or in a message box. You want to find all the places that exact string is used in the code. 2. You don't remember the exact text, but know you are finding something like 'compilation error' 'compile error' etc.
For 1. a simple find would suffice, but for 2. it is very inconvenient to shoot searches for all your guesses. Also in 1. it can happen that the text you were reading had been put together from parts in the code ("%s occurred during %s"). In a window like fsiw you could check many hypotheses, easily finding the solution.
Additionaly, had that functionality available, one could have a quick overview of string usage in the whole project. It is a bit of static analysis, helps to decide whether to use string pooling, whether to use a string proxy instead of strcpying the literal etc.
L".." and all the new types of string literals in C++0x just make the issue more complicated.
I don't have exact imagination of the best presentation of the list, probably multiple usages of the same string literals should be displayed somehow grouped together. |
|