Questions tagged [resharper-plugins]
34 questions
10
votes
2 answers
How to rewrite AST dynamically in resharper plugin?
The request:
I'd like to be able to write an analyzer that can provide a proxy value for a certain expression and trigger a re-parsing of the document.
The motivation:
Our code is littered with ABTests that can be either in a deployed or active…

Erti-Chris Eelmaa
- 25,338
- 6
- 61
- 78
3
votes
1 answer
Create a generic type to find implementations of in a Resharper plugin
I'm writing a plugin for resharper which I want to use to navigate from a ConcreteCommand -> ConcreteCommandHandler where those types look like this
public class ConcreteCommand : ICommand
public class ConcreteCommandHandler :…

Sam Holder
- 32,535
- 13
- 101
- 181
3
votes
1 answer
How can I install an old version of a ReSharper plugin?
I'm using ReSharper 8.0 in Visual Studio 2010. ReSharper 8.0 uses a NuGet-based Extension Manager for plugin management, which makes it very easy to find and install plugins, but this Extension Manager will only offer up the latest version of any…

AakashM
- 62,551
- 17
- 151
- 186
3
votes
1 answer
Delete IProperty from IClass using Resharper 7.1 plugin
I want to create a resharper plugin that removes properties with return type string from a class. I already created a IActionHandler which gets all properties from the selected class, but I don't know how I can modify code structure to remove the…

Dennis
- 1,027
- 1
- 14
- 30
3
votes
1 answer
Resharper API for selected text and remote code generation
I'd like to write a Resharper plugin that lets me generate code in another class based on highlighted text, and the API isn't the most transparent. What methods should I look at to get access to selected text, and to code generation outside of the…

Matthew Piziak
- 3,430
- 4
- 35
- 49
2
votes
1 answer
ReSharper 6 Plugin: Adding HighlightingInfos
I am currently writing a ReSharper 6 Plugin that should add Warnings to my IDE. These are read from an XML file with a LineNumber and other data.
So far I have created an IDaemonStage with ErrorStripeRequest.STRIPE_AND_ERRORS and a…

Simon Woker
- 4,994
- 1
- 27
- 41
2
votes
1 answer
Using ReSharper "Call Tracking" from inside a plugin via the SDK
I'm writing a plugin for ReSharper 7, and I'd like to be able to use Call Tracking from inside my plugin. I haven't come across anything in the SDK that lets me do this, is it possible at all?
Specifically, I want to be able to get the "incoming…

Wilka
- 28,701
- 14
- 75
- 97
2
votes
1 answer
Writing a Resharper ContextAction that takes user input
I want to create a Resharper ContextAction which takes a string from the user. How can I create a box with an input field whose entered value can be processed inside the ExecutePsiTransation method?

Matthew Piziak
- 3,430
- 4
- 35
- 49
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
1 answer
How to find a type by FQN in a solution?
I am writing a Rider/ReSharper nav-from-here plugin which is supposed to determine a target type based on a symbol I am standing on using some simple rules, and finally, navigate to it.
The first part is okay, I have managed to form the FQN needed,…

Mikhail Dudin
- 459
- 5
- 15
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
2 answers
Run ReSharper plugin tests using R# test runner
I'm building a R# plugin and decided to cover it with tests. However, I noticed, that plugin tests cannot be run using the R# runner if plugin target version is the same as R# version.
For instance, if you try to run tests using…

Alex Povar
- 674
- 3
- 15
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