February 22, 2005

Are You Feeling Lucky?

In version 2.0 of the ReSharper we're going to extend the refactoring pipeline to add better conflict support and optional changes (for possible occurences in comments and string literals). Note that it mainly won't affect your usual refactoring experience as long as you don't get any conflicts.
But we sometimes also think about creating some shorthands for running refactorings with default options (like Google's I'm Feeling Lucky button) - for example, a method can be extracted with default options for return value, etc. with just a single shortcut. It will extract method and create live template over it to let user specify name of the method and its parameters. Somewhat similar approach we utilize in renaming locals and searching references. In the latter case we have one shortcut (Alt+F7) for running search with last specified options and another (Shift+Alf+F7) for specifying all options and then running the search.
Of couse you won't be lucky all the time so the question is: which refactorings you feel match this scheme well and which options you think should be configurable even in such "quick" scenario?

Posted by Oleg Stepanov at 01:39 PM | Comments (32) | TrackBack

February 09, 2005

Source Code Search Engines

I've recently thought of adding additional feature to ReSharper: something like "Extended Help" : it would search the Web and some special sites like (MSDN Online, .NET 247, etc.) for information about that exact symbol which is currently selected in the IDE. One thing I would also like to implement there is searching any publicly available code repositories for usages of the symbol. The idea behind that is allowing users to see how the symbol is used by their peers what could help them to detect errors in their code and find useful API usage patterns. Several days ago I found a site which does almost what I said: koders.com. Unfortunately it only performs textual indexing of source code so it's difficult to find occurences of a specific method (or even indexer if we take C#). I also didn't like the results format much. Maybe anyone knows a search engine which also performs resolve on open source repositories and allows searching particular symbols. If not, it's another nice idea to work on in spare time when I get some. I never wrote search engines so it must be a very exciting experience ;)

Posted by Oleg Stepanov at 01:51 PM | Comments (309) | TrackBack