ReSharper provides Open API, which is the same API that has been used to create all the features of ReSharper.
From an architectural point of view, the ReSharper API is divided into the following three layers:
When you are working on a plugin project, you can easily find the related assemblies based on their names, which are as follows:
JetBrains.Platform.ReSharper.*
JetBrains.ReSharper.Psi.*
JetBrains.ReSharper.Features.*
and JetBrains.ReSharper.Feature.Services.*
The hierarchy of these levels is presented in the following screenshot:
It is important to understand the responsibilities of these layers.
Platform is the first base layer, which allows you to work directly with the Visual Studio API.
The most important modules that you can find here are as follows:
In the case of the component model, there are two types of components: shell components (created when the Visual Studio shell is created) and solution components (created when the Visual Studio solution is opened).
PSI is the most used layer as it serves as a parser for languages supported by ReSharper. It builds Abstract Syntax Tree (AST), which you can access and navigate to through your plugin.
In the top level, we have the features and plugins that we can see in ReSharper, such as navigation, code competition, and live templates. As you can see, built-in features are on the same level as plugins, which means that you, as a plugin developer, have access to the same methods as JetBrains developers, who create new features.
3.149.213.44