Can you give examples of such tools and how they are helpful ?[/quote]Smalltalk has a bunch of that stuff just there, built in and working since forever. When you have objects with metadata instead of justplainstrings you can analyse more and better.
Well the obvious in-your-face one is the code browser. Since classes know what methods they provide you can organise the view to show methods in their proper class. And the metadata about what category each method belongs allows further organisation. Obviously classes understand their place in the hierarchy and can handle being moved when refactored.
Of course, methods are proper objects too, and they know about what variables they use, so you can query what methods use certain variables. That's quite different to string searching dead text. you can find out if a method refers to 'super' and thus refines a method in a superclass. You can ask what class it belongs to, what messages get sent, how many temporary variables or arguments it uses. You can even ask for its source code, assuming the log file holding the plain text is connected. If not, you can ask it to disassemble and provide a reasonable pass at uncommented source. You can find out how much code a method has, both in terms of the textual version and the compiled version. You can even see the compiled version in the code browser if you really want.
You can build queries to find out all methods in classes descended from Foo that use a certain instance variable and send certain message, then browse the results. You can find all the methods implementing a message that have more than x versions known between two dates. That helps with our packages management tools for example.
A bigger and sneakier example is the about-to-be-released background code analyser and optimiser. Since we have all this data about the code - including ways of working out how often any of it is used - we can reason about it and decide whether, when and how to optimise.
Could you do this sort of thing with 'a text editor'? Well, I guess so as long as the editor could actually parse the entire relevant source repository and analyse it appropriately. Seems a lot easier to me to have that information always there, live, integrated into your working tools and intelligible.