ReSharper API - Identify a Event-Method

Hello ReSharper-Community,

i like write a AddIn for ReSharper. The AddIn must identify a Event-Method from object.

SampleClass sampleClass = new SampleClass();
sampleClass.ThisIsAEventMethod <-- I like identify this and start a refactoring in......


this.....

MySpecialClass.FromEvent(sampleClass.ThisIsAEventMethod);


What for a Interface i needet, for this identigy? And waht i needet for the refactoring?

Thanks

BFreakout

3 comments

Hello Gregor,

Could you please clarify what do you want to achieve? Do I understand correctly
that you'd like to highlight sampleClass.ThisIsAEventMethod (with curly underline
for instance) and provide a quick-fix to convert this into MySpecialClass.FromEvent(...)?
Have you considered using Structural Search and Replace for this purpose
(see http://www.jetbrains.com/resharper/features/navigation_search.html#Structural_Search_and_Replace)?


Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello ReSharper-Community,

i like write a AddIn for ReSharper. The AddIn must identify a
Event-Method from object.

SampleClass sampleClass = new SampleClass();
sampleClass.ThisIsAEventMethod <-- I like identify this and start a
refactoring in......
this.....

MySpecialClass.FromEvent(sampleClass.ThisIsAEventMethod);

What for a Interface i needet, for this identigy? And waht i needet
for the refactoring?

Thanks

BFreakout

---
Original message URL:
http://devnet.jetbrains.net/message/5312162#5312162



0

Hello Andrey,

thank you for the answer. yes, i search the interfaces for this Feature style "Structural Search and Replace". I like write the Plug-In for other Users with the same requirements. Only i need the Interfaces for this function. I like code a Reactive Extensions Plug-In for ReSharper....

Bye,
Gregor

0

Hello Gregor,

If you'd like to write a plug-in, here's a good article: http://hadihariri.com/2010/01/12/writing-plug-ins-for-resharper-part-1-of-undefined/,
that describes how to create a context action and a highlighting and mentiones
all the necessary interfaces. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello Andrey,

thank you for the answer. yes, i search the interfaces for this
Feature style "Structural Search and Replace". I like write the
Plug-In for other Users with the same requirements. Only i need the
Interfaces for this function. I like code a Reactive Extensions
Plug-In for ReSharper....

Bye,
Gregor
---
Original message URL:
http://devnet.jetbrains.net/message/5315110#5315110



0

Please sign in to leave a comment.