Accessing ReSharper API from VS 2005 macros?

Looking to do something along the lines of:

Dim typeName as string
typeName = "SomeType"

ReSharper2005AddOn.GotoType(typeName);

I'm looking to keep it at a much higher level than writing a full plug-in. We have a solution using the built in DTE.ItemOperations.OpenFile(filename) but the above we be much nicer as it does not require a filename but a type name. Basically just looking for an example of how you'd call ReSharper features from a VB Macro if such a thing is possible. Thanks in advance.

-C

1 comment

Hello Chris,

I've investigated the problem, and from what I can conclude it seems
that unfortunately ReSharper API cannot be accessed from VS 2005 macros.
The problem is that macros are executing outside of the VS process (devenv.exe),

within the vsmsvr.exe process. And ReSharper API is entirely in-process,
so there is
no simple way to communicate with it in a macro.

I think that a recommended solution in your case is to write a ReSharper
add-in. It is fairly
simple to do, and a plugin can be easily installed and run. May be you can
describe in more detail what
type of user-level functionality you're looking for?

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Looking to do something along the lines of:

Dim typeName as string typeName = "SomeType"

ReSharper2005AddOn.GotoType(typeName);

I'm looking to keep it at a much higher level than writing a full
plug-in. We have a solution using the built in
DTE.ItemOperations.OpenFile(filename) but the above we be much nicer
as it does not require a filename but a type name. Basically just
looking for an example of how you'd call ReSharper features from a VB
Macro if such a thing is possible. Thanks in advance.

-C



0

Please sign in to leave a comment.