Resharper wishlist
Hyperlinks from ]]> tags in the XML comments.
The ability to select a number of classes as top level code (i.e. callable from outside of your solution) and have Resharper report on all unused code elements, even if those code elements are marked as public.
Similar to the above, but with the ability to "lock down" the code by analysing and giving every class, method, property and event the least privileged access (i.e. public, protected+internal, protected, internal, private.
Auto-complete for classes that are not in the currently scoped namespaces. (Currently I have to type the entire class name and then Resharper prompts to add the using directive - sigh).
Promote local to field.
Alt+Enter light-bulb to "Create overload".
Move method/property to another class (leaving delegating stub)
http://extraview.co.uk/cs/blogs/james_hebbens_blog/archive/2005/04/14/4.aspx
Please sign in to leave a comment.
Hello James,
JH> Hyperlinks from tags in the XML comments. Use "goto definition" feature. JH> Auto-complete for classes that are not in the currently scoped JH> namespaces. (Currently I have to type the entire class name and then JH>]]> Resharper prompts to add the using directive - sigh).
Use Ctrl-Alt-Space to select type with auto-import namespace.
Sincerely,
Ilya Ryzhenkov
Ctrl-Alt-Space. Ooh. That's sweet
Invoke "Introduce Field" (Ctrl-Alt-D) when on declaration of the local. Is
it what you want?
How should it work? Where should it take the instance of the new class (for
delegating stub) and of the old class (in the body of the method)?
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
First, Promote local to Field. I knew it did that. Not sure why I had forgotten. Thanks for the prompt.
Second, Move to class.
The initial (contrived) code contains a class Bar that uses data from Foo to calculate values
The refactored code contains a class Bar that uses an operation in Foo to calculate values. The only difference is in the new Foo.Diff property and the refactored Bar.Diff property, shown here.
The steps, as I see it, are:
1. Select a method, or selected block of code in a method.
2. Select Resharper | Refactor | Move to class.
3. Give class choice based on classes referenced in current method/code block selection.
4. Create new method/property in target class (Foo). Default name is the name of the source (Bar) method/property (user can override).
5. If the source method uses fields or locals, these must be passed as parameters to the new method (parameter could be an instance of the source class).
6. Move the body of the code from source to the new target method.
7. Remove the instance from all instance references to the target instance in the new target method (e.g. foo.Min => Min).
That's it ;))))). I am sure there are plenty of subtleties to this.
After this refactoring, it would be useful to have the following extra refactoring:
- Inline Method/Property, such that all code calling Bar.Diff now calls Foo.Diff directly.
IMHO your end game should be to support all of the refactorings in Martin Fowler's Refactoring book: http://www.amazon.co.uk/exec/obidos/ASIN/0201485672/202-2936304-4099851
Hello James,
James, check out:
http://www.jetbrains.com/resharper/documentation/1.5_ReferenceCard.pdf
Print this bad-boy out, put it on your desk, and abuse it ... you'll be a
ReSharper master in no time ... :-P
Best,
David Stennett
JetBrains, Inc.
JH>> Hyperlinks from tags in the XML comments. JH>>]]>
A faster method is to use ReSharper Ctrl+B shortcut (VB Goto Definition is
rather slow).
JH>> Auto-complete for classes that are not in the currently scoped
JH>> namespaces. (Currently I have to type the entire class name and
JH>> then Resharper prompts to add the using directive - sigh).
JH>>
Thanks,
Andrey Simanovsky
Been using Ctrl+B for ever. It keeps working when VS Goto Definition fails miserably.
Hello Andrey,
JH>>> Hyperlinks from tags in the XML comments. JH>>> >> Use "goto definition" feature. AS> A faster method is to use ReSharper Ctrl+B shortcut (VB Goto AS>]]> Definition is rather slow).
I surely meant Resharper's feature :)
/Ilya
Thanks for your example. We'll consider adding this refactoring.
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Here's another request - a simple HTML editor (with wysiwyg table editing).
The problem with all the other editors is that they deposit tons of junk in
the resulting HTML. Some of them don't even work - like the one in the VS.
The motivation is FIT - a testing framework driven through HTML tables.