resharper-devguide icon indicating copy to clipboard operation
resharper-devguide copied to clipboard

Breaking change: ProcessChildren removed

Open citizenmatt opened this issue 11 years ago • 5 comments

ProcessChildren method removed and replaced with TreeNodeExtensions.ThisAndDescendants and friends. For perf reasons.

citizenmatt avatar Dec 08 '14 20:12 citizenmatt

Yes, I noticed :) (actually, for Mulder this was one of the 2 broken APIs, the other is that Daemon.GetInstance(solution) was removed and turned into an extension methods. All the rest were namespace changes)

hmemcpy avatar Dec 09 '14 09:12 hmemcpy

GetInstance for any type is evil and should be eliminated. Inject it where possible or feel pain by using component container's GetComponent so you'll hurry to eliminate it in future :)

derigel23 avatar Dec 09 '14 09:12 derigel23

Yes, you're right, of course. I just took it off some highlighting code I found. Here's how I used it in SDK8:

https://github.com/hmemcpy/AgentMulder/blob/master/src/Shared/AgentMulder.ReSharper.Plugin/Highlighting/ContainerGutterMark.cs

Could I inject IDaemon instead? Hmm, it also seems I'm pulling a SolutionManager similarly... oh well...

hmemcpy avatar Dec 09 '14 09:12 hmemcpy

Nope, this is the case where you need to feel pain... IGutterMark is shell level component, Daemon is solution level component. But you can, at least, inject SolutionsManager.

derigel23 avatar Dec 09 '14 09:12 derigel23

It works, I don't touch it! :)

Btw, notice that the class name AlteringFeatuThemedIcons is mis-spelled? For some reason, the re from Feature is cut off :) I once reported this as a bug https://youtrack.jetbrains.com/issue/RSRP-316000, still present in 9.x

hmemcpy avatar Dec 09 '14 10:12 hmemcpy