Tutorial :If you had to create something like ReSharper, where would you start?



Question:

If you had to create a plugin like ReSharper for Visual Studio, where would you start?
(not talking about each and every feature, but I am trying to just get a skeleton of it going).


Solution:1

As of beginning of 2007, JetBrains guys estimated ReSharper to be around 30 man-years (this is a Google Translated version of a post on a Russian forum). They also say that it's not enough to be proficient in building compilers: they consider the most complex parts to be caches, AST transactions, AST contexts, etc. Visual Studio integration was not the most sophisticated thing technically: it was just a matter of reading tons of docs.

So this is basically it: Visual Studio integration and AST managements will be the most complex parts to implement to get a skeleton of ReSharper.


Solution:2

I certainly wouldn't try to reverse engineer Resharper using, say, Reflector. No sir, not me. Never.


Solution:3

I'd start by digging around in one of the open source alternatives, such as TytanNET. Obviously, if you were interested in a specific feature of Resharper, then there may be a more direct option.


Solution:4

I had the pleasure of writing some plugins for ReSharper to make additional changes to the code layout and style (as per coding guidelines of a company I work at). It's not very easy, but the API is fairly rich, albeit very poorly documented, so using Reflector will be mandatory.

I would suggest looking at the source code for great existing plugins, such as Agent Johnson and StyleCop for ReSharper. You can also try to get help at the ReSharper Open API forums at JetBrains.

EDIT: Apparently I can't read. I thought you meant plugins for ReSharper. In that case I would begin by starting with the Visual Studio SDK, learning how to interact with the code, build the AST, etc. There are many examples provided in the SDK.


Solution:5

File -> New -> Project

Other Project Types -> Extensibility -> Visual Studio Add-in


Solution:6

I would probably start by making sure I had an understanding of which specific refactorings were to be supported by my tool. "Something like resharper" is a little general to know "where to begin" from a technical standpoint.

So, as I said, I would start by trying to make sure I understood the business requirements. From there, it gets easier to break the project down into smaller and more manageable sub-problems.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »