Custom Macro that generates code somewhere else in the class Follow
Hi,
I am building a custom macro to be used with a specific live template (reason: increase productivity in a specific project).
What I want the macro to do is: after it has finished (so on the Finish event of the
In the handler for the Finish event I get a reference to the HotSpotSession.
I do not understand how am I suppose to generate the code. I suppose I need somehow to get a reference to the Class I added the tempalte in and start from there.
My question are:
1. Is my approach corect ? Can I really use macros for my situation ?
2. How do I generate code starting from a HotSpotSession ?
Please sign in to leave a comment.
Funny, nobody knoes anything.
You can always extend Resharper with an addin to create a more powerfull macro wich fit your needs.
Thats all what I can say.
That's not very usefull.
Unless you know how I can interfeer in the way macros are handled by Resharper.
I'm sorry. I don't think I can help you. The idea with the macro is something I would have tried when the built in macros do not fit my needs.
But the hole Resharper-Addin "Thing" is a great mysterious. To learn something the best aproach seems to study examples and other addins. Wich is really slow I think.
What I found out was that Macros implement IMacro. But as a quick look there seems to be no "Finnished" event to hook in.
Well if you could provide some detailed example mybee we can find some way. I hope some Resharper guy is seeing this thread and can give you some hint. There is also a forum related to addins/extending resharper if you have to take this way.