ReSharper 2.5 Plugin Development
If you feel bounded by the fixed set of ReSharper and Visual Studio possibilities, you can add the features of your dreams yourself with ReSharper API. Bounds on this level are extremely wide - actually, many ReSharper features are implemented using the same API that is at plugins' command. And thanks to its managed nature you can use ReSharper API just as a handy wrapper around messy Visual Studio COM interfaces.
Writing a plugin is quite simple given you are familiar with .NET development. You just compile an assembly containing classes which implement your feature. Then ReSharper automatically plugs them to the right places based on special attributes you mark your classes with.
ReSharper run-time environment
- Component model
- Multithreading model (under construction)
Building and deploying
- Creating plugin project
- Building, running and debugging plugin
- Deploying plugin
Plugin development tasks
- Creating and handling actions
- Creating option pages
- Creating tool windows
- Utilizing standard tool windows
- Creating custom search
- Working with documents, project files and text views
- Working with text editor
- Working with code elements and program structure (under construction)
- Creating code analytics (under construction)
- Creating quick fixes (under construction)
- Creating context actions (under construction)
- Creating Live Template macros (under construction)
- Creating shell components (under construction)
- Creating solution components (under construction)
Power toys are plugins that shows how to use various techniques together. They are a lot more complex than plugin samples and require good knowledge of ReSharper OpenAPI to understand the source code. However they do useful things and can be installed just to add functionality to ReSharper.
- Find Text
Searches text in solution similar to Visual Studio "Find in files", but results are presented in ReSharper Find Results View.
- Explore Type Interface
Opens type in a tool window with public/protected/internal members displayed, sorted/grouped by kind. Members having associated types can be expanded further.
- Cyclomatic Complexity
Provides indication of cyclomatic complexity value for each member, when value exceeds specified threshold.
- Generate ToString
Context action inside ToString method body, which generates quick and durty implementation which dumps fields states.
- Generate COM wrapper
Generates wrapper class which calls COM interface methods and catches COM exceptions.
- Current File Macro
Demonstrates creation of simple Live Template macro
You can ask questions, discuss issues and new features directly with ReSharper developers:
- In web forums
- In newsgroups