ReSharper 2.5 Plugin Development

Skip to end of metadata
Go to start of metadata

ReSharper Plugins

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

  1. Component model
  2. Multithreading model (under construction)

Building and deploying

  1. Creating plugin project
  2. Building, running and debugging plugin
  3. Deploying plugin

Plugin development tasks

  1. Creating and handling actions
  2. Creating option pages
  3. Creating tool windows
  4. Utilizing standard tool windows
  5. Creating custom search
  6. Working with documents, project files and text views
  7. Working with text editor
  8. Working with code elements and program structure (under construction)
  9. Creating code analytics (under construction)
  10. Creating quick fixes (under construction)
  11. Creating context actions (under construction)
  12. Creating Live Template macros (under construction)
  13. Creating shell components (under construction)
  14. Creating solution components (under construction)

PowerToys

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

Downloads

Online support

You can ask questions, discuss issues and new features directly with ReSharper developers:

  1. In web forums
  2. In newsgroups
  • No labels