Questions tagged [resharper-sdk]

The ReSharper SDK allows developers to create their own plug-ins for JetBrains ReSharper.

The ReSharper SDK allows developers to create their own plug-ins for JetBrains ReSharper. The SDK consists of the following:

  • A complete set of ReSharper reference assemblies, including PDBs and XML documentations. These assemblies include ReSharper's core DLLs as well as the unit testing infrastructure, letting developers test their own plug-ins.
  • A set of project and solution templates for Visual Studio 2010, that help developers quickly get started with a preconfigured sample plug-in.
  • A set of item templates that let plug-in authors quickly add various ReSharper features to their plug-in.
  • A comprehensive set of samples which include the ReSharper PowerToys as well as a separate plug-in that demonstrates a single feature implemented across many of ReSharper's extensibility mechanisms.

To download the SDK, please visit the ReSharper Downloads page. For a comprehensive document on plug-in development, consult the ReSharper Plugin Development Guide.

27 questions
3
votes
1 answer

How to create [CustomAttribute(typeof(GenericType<,>))] with ReSharper SDK?

Is there a way to create an attribute with a typeof expression with a generic type? The following code works only partially: CSharpElementFactory factory = ... IClassDeclaration typeDeclaration = ... IClassDeclaration classDeclaration = ... IType[]…
Michael Damatov
  • 15,253
  • 10
  • 46
  • 71
2
votes
1 answer

How to provide intellisense with the datacontext type in a resharper plugin?

When writing a wpf prism app, I use the ViewModelLocator to automatically create the datacontext when needed. While this works great, there's no intellisense help unless I add a designtime datacontext (d:DataContext="{d:DesignInstance…
Haukinger
  • 10,420
  • 2
  • 15
  • 28
2
votes
1 answer

ReSharper SDK test for Context Action doesn't work

I try to test my custom ReSharper Context Action using ReSharper SDK built-in test infrastucture. I've created an input file, an output file (.gold) and run the test. Two problems occur: Test is always successful (even if input and .gold files…
Ilya Chumakov
  • 23,161
  • 9
  • 86
  • 114
2
votes
2 answers

How do I get an IDeclaredType from an IClrDeclaredElement with the Resharper SDK

I'm writing a navigation plugin for Resharper, and my situation is that I have a list of IDeclaredElement that I obtained from doing var declaredElements = context.GetData(DataConstants.DECLARED_ELEMENTS) This element is the element that the user…
George
  • 1,964
  • 2
  • 19
  • 25
1
vote
1 answer

Cannot debug a plugin for ReSharper made with SDK

I'm using VisualStudio2010 SP1, ReSharper 6.1.1. and the ReSharper SDK 6.1.0.51. I ban build a new plugin easily with the project wizard, but unfortunately I cannot debug it. No breakpoint will be hit. Even the samples provided with the SDK work,…
Fischermaen
  • 12,238
  • 2
  • 39
  • 56
1
vote
2 answers

How to get the filename and line number of a particular JetBrains.ReSharper.Psi.IDeclaredElement?

I want to write a test framework extension for resharper. The docs for this are here: http://confluence.jetbrains.net/display/ReSharper/Test+Framework+Support One aspect of this is indicating if a particular piece of code is part of a test. The…
Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130
1
vote
0 answers

Does the ReSharper API expose ReSharper refactorings?

I'd like to know if the ReSharper API exposes the refactorings that come with the ReSharper plugin. So far I haven't been able to find anything on this in the docs or online. Basically I want to be able to execute several refactorings sequentially…
ChrisGS
  • 293
  • 2
  • 10
1
vote
0 answers

How can I disable specific Visual Studio Commands from my Package?

I am creating a package which requires the text white space be in a specific format. Without arguing about the reason why lets just assume this is an okay requirement. I must then prevent visual studio from auto-updating the code. This is fairly…
jwize
  • 4,230
  • 1
  • 33
  • 51
1
vote
1 answer

Resharper run configurations

I'm trying to make a reshaprer plugin to add one (or more) configurations, besides executable, static method, project, at resharper's build/run window. Any guidelines where to start? Or how to access build's context and configure? Currently…
dseferlis
  • 467
  • 2
  • 6
  • 11
1
vote
0 answers

How to implement bulk actions in ReSharper 10?

I am trying to get a general overview on how to implement plugins for ReSharper. I was able to develop a very simple plugin, deploy it, and use it to perform action that I desire. However, I wanted to change my plugin to support bulk action mode.…
Michal Hosala
  • 5,570
  • 1
  • 22
  • 49
1
vote
1 answer

How do I prevent ReSharper from prefixing built in types with an '@' symbol when generating code?

I am writing a ReSharper plugin and I want to do this: CSharpElementFactory factory = CSharpElementFactory.GetInstance(treeNode.GetPsiModule()); factory.CreateTypeMemberDeclaration( "public static $0 $1 (this $2 $4) { }", "string", …
Sam Holder
  • 32,535
  • 13
  • 101
  • 181
1
vote
1 answer

Extend ReSharper's Unit Test Sessions window

Is it possible to extend (eg. add a menu item to a context menu in) ReSharper's Unit Test Sessions window? What I'd like to achieve is to be able to select one or more tests and then apply a custom category attribute to those tests (eg. modify the…
David Gardiner
  • 16,892
  • 20
  • 80
  • 117
1
vote
1 answer

Arbitrary checks in ReSharper plugin testing

As I learned from DevGuide testing ReSharper plugins works as follows: Plugin is loaded and test input file is passed to it Plugin performs it's actions on the passed file ReSharper's test environment writes plugin actions results to .tmp file in a…
MadRatX
  • 13
  • 4
1
vote
2 answers

Get all IDeclaredType-s in current project (for a ReSharper Generator plugin)

I'm writing a ReSharper 7.1 Generator plugin and need to get a list of all types declared in the current project (classes, interfaces and structs - IDeclaredType-s) for the GeneratorProviderBase.Populate method. With regular…
mbinic
  • 31
  • 8
1
vote
1 answer

What is difference between DaemonStage and ElementProblemAnalyzer?

I'm developing Resharper plugin and I don't realize between Deamon Stages and Element Problem Analyzers? When I need use one or another? If they both provide code analysis.
azhidkov
  • 1,047
  • 3
  • 14
  • 23
1
2