Questions tagged [resharper-plugins]
The resharper-plugins tag has no usage guidance.
36
questions
0
votes
2
answers
23
views
How to run tests of R# plugin from CLI
I want to execute the tests from this R#/Rider plugin within a GitHub Action and therefore I need to run the tests from the CLI. Simply runnning dotnet test does exactly nothing but building the ...
0
votes
1
answer
30
views
How to get access to the IType / IDeclaredType from an ITreeNode in ReSharper?
I am exploring writing Plugins for ReSharper / Rider. Following the documentation's example, I am building a context action for ReSharper.
Here is the context action, which is not doing much yet:
[...
0
votes
0
answers
35
views
ReSharper extension manager doesn't see local packages
ReSharper extension manager doesn't see local packages. Why this might be hapenning?
I have the dependency on Wave so I don't see any reason this hapenning.
I use Visual studio 2019 and ReSharper 2021....
1
vote
1
answer
81
views
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 ...
1
vote
0
answers
59
views
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 ...
1
vote
0
answers
42
views
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 ...
0
votes
1
answer
58
views
Why isn't my custom macro showing up at template explorer?
I am trying to develop a macro for c# templates, but it simply doesn't work. I have tried reading the whole (incomplete) documentation, or find the source code of a macro to use as an example, but I ...
0
votes
1
answer
30
views
R# Plugin test: How to specify context action with bracket in name
I created a composite context action that returns a couple of intentions with the following texts:
[Tag] Action
Second Action
Now I'm trying to cover this action by tests. I did everything by ...
1
vote
1
answer
149
views
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 ...
1
vote
2
answers
75
views
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, ...
10
votes
2
answers
133
views
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 ...
0
votes
2
answers
110
views
Deploy Resharper 9.2 Plugin as a dll
For Resharper 7.1 we had written a Resharper Plugin - which was placed in the C:\Users\<UserName>\AppData\Roaming\JetBrains\ReSharper\vAny\Plugins
folder. In VS 2012 the plugin worked without ...
1
vote
1
answer
60
views
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 ...
1
vote
2
answers
55
views
How do I get a window context so I can create NavigationOptions in a resharper plugin
I have a navigation plugin which I want to extend to allow support for context navigation. I've got everything I need except for the NavigationOptions instance. In my INavigateFromHereProvider I get ...
1
vote
1
answer
77
views
How do I create a `ITypeElement` with represents a closed generic type in a ReSharper plugin?
I'm using the ReSharper 8 sdk and want to find all inheritors of a particular generic interface, where the generic type is a particular type. I have asked a more general question which got most of the ...
3
votes
1
answer
296
views
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 ...
1
vote
1
answer
81
views
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 ...
0
votes
1
answer
30
views
SearchDomainFactory.Instance is obsolete: 'Inject me!' ( Can't find out how to create instance)
I'm in the process of trying to migrate a R# extension project from R# 6 to R# 8. (I've taken over a project that someone wrote, and I'm new to writing extensions.)
In the existing v6 project there ...
1
vote
2
answers
91
views
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<...
1
vote
0
answers
244
views
Resharper - Unit Test Runner - Hide Namespace
Is there a way to hide the Namespace in Resharper Unit Test Runner? I'm using the Project Structure Group By and the Namespace is just cluttering the Window:
Could this be fixed quickly in an ...
0
votes
1
answer
481
views
Unable to resolve JetBrains.ReSharper.SDK while installing a ReSharper's plugin
I'm trying to install a custom ReSharper's plugin I wrote using the ReSharper Extension Manager but I get the error
Attempting to resolve dependency 'JetBrains.ReSharper.SDK (≥
8.2.1158)'.
...
3
votes
1
answer
2k
views
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 ...
3
votes
1
answer
128
views
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 ...
0
votes
1
answer
108
views
Accessing IMethodDeclaration objects via ReSharper SDK
I have in hand an INamespaceBody, IClassDeclaration, and IMethod. I want to get the IMethodDeclaration corresponding to the IMethod and the IClassBody corresponding to the IClassDeclaration. But I am ...
1
vote
0
answers
80
views
Accessing selected code using ReSharper SDK
Is there any way to recognize and extract a chunk of code that has been highlighted by clicking and dragging using the ReSharper SDK?
2
votes
1
answer
327
views
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?
...
0
votes
2
answers
168
views
Call ReSharper ContextAction from Action
I want to write a ReSharper Action that just calls a ContextAction. Is this possible? A ContextAction takes a Solution as a parameter, and an Action gets a DataContext on construction. So the question ...
1
vote
2
answers
251
views
Deploy Resharper plugin to users without SDK installed
I wrote a Resharper plugin that seems to only work when users have the Resharper SDK installed. Is there a way to package the required libraries into the plugin dll, so that users just need to drop ...
1
vote
3
answers
89
views
Suppress IProgressIndicator in Resharper ContextAction
I'm writing a Resharper ContextAction, and the progress indicator that pops up after a second keeps stealing the focus from my text box. How can I suppress the progress indicator that gets passed to ...
2
votes
1
answer
111
views
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?
0
votes
2
answers
110
views
How does AddAttributeBefore work in the Resharper API?
In the Resharper API, JetBrains.Resharper.Psi.Csharp.Tree.AddAttributeBefore takes an IAttribute param, and an IAttribute anchor. How are these arguments different, and how can they be constructed?
3
votes
1
answer
302
views
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 ...
2
votes
1
answer
178
views
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 ...
1
vote
2
answers
321
views
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 ...
0
votes
2
answers
6k
views
How do I setup ReSharper with Stylecop 4.5?
I just installed Stylecop 4.5 RC. I also installed ReSharper 5.1. However, I don't see StyleCop in the Tools section of ReSharper. Is ReShaper supposed to be able to get my code up to stuff with ...