[MonoDevelop] what's your top ten resharper features.

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Mar 18 19:46:19 EDT 2009

On Wed, Mar 18, 2009 at 11:46 AM, Oliver Stieber
<oliver.stieber at ukplc.net> wrote:
> I'm still working on a resharper like addin and I would like to know what are your top ten resharper features that you like. Well, maybe not all ten but the things you like the most and the things it doesn't do that maybe it should.
> Here's my list, let me know if you like it. Have any additions extensions to it or any other ideas of things that you would like a resharper like addin to do.
> Things I like in resharper aree.
> Compiler Warnings and Errors.
> Tidying up / Creating using declarations.
> Extract Method.
> Could be declared in inner scope.
> Unused static
> Could be declared static.
> Some of the code generation for inline construction and classes and field setting.
> Implement interface
> Declare a variable at it's first assignment.

All of these sound awesome!

> And maybe a few others I forgotten.
> (things I hate are invert if statement, tried it once, was a bit of a fiddle to undo and made my code really unflexable when it came to wanting to do things in the future)
> *****************************
> Some things I would like to add that it doesn't do:
> *****************************
> Suggest using an interface or base class when possible to use it instead of the declared class (I think later version of resharper than I'm using do this but I haven't come across it doing it yet).
> Show scope of a variable, and in the case of a variable being used before it's assigned show the scopes that it wasn't assigned in.

How would this be shown?

> Move the variable to the inner scope it could have been declared in.
> Wrap a class, i.e. have a class as a private member and wrap all it's methods for when you don't want to inherit it. (this may also be nice to do with with event's when a method is hit too)
> *****************************
> Some sudo-python features.
> *****************************
> Based on the usage of a variable:
> declare it in the class, as a function parameter or as a variable in the function. And suggest it as a variable name in code completion if the type is correct.

Sounds useful, though I've seen some screenshots of pretty horrible
name suggestions in resharper ;-)

> Create a new Class / Interface / Struct for the variable with members based on the functions and fields / properties used on that variable.
> Create a new function based on how it's called.

That's probably my favourite. I think VS does this :)

> *****************************
>        Coding standards checks probably as an additional addin.
> *****************************
> Some basic, but hopefully extensible coding standards.
> Like using GetString, String.Format for strings and other (as defined by the user) best practices, don't declare members public use properties. I'll probably start with some of the IDesign list and see what can be automated.
> Enforcing naming conventions as much as possible
> Spell checking comments
> Spell checking variables, function, class etc.. names (so long as Pascal, Camel or C&R type naming conventions have been used)

My biggest question for all of this is how you plan to implement this.
Would it be something very C#-specific, based on NRefactory? Some of
it could be based on general postprocessing of the parsed DOM. I've
actually been considering something a bit like this already, for ASPX
and HTML files.

My rough plan goes as follows:
* any file could have multiple parsed outputs, e.g. an HTML DOM, a
MonoDevelop.Project.Dom/.NET compilation unit, a list of strings, a
list of errors, a list of folds, etc
* parsers would either operate on raw files, or other parsers'
outputs. For example, the spell checker could operate on string lists,
producing error lists. The ASPX parser could produce a C# text output.
* some output would be persisted to databases. Others would be created
on demand. So there would have to be a way to register active "sinks"
for parsed information.
* the text editor would register a sink for folds and error lists on
the files it had open

The parser service would have a trickier time scheduling all of this,
but it could do interesting things like scheduling different parsers
with different priorities, using multiple cores, etc.

Michael Hutchinson

More information about the Monodevelop-list mailing list