Is there a way to show all the extension functions of a given Kotlin class in Intellij IDE?

微笑、不失礼 提交于 2019-12-13 03:22:58

问题


The only way I've found so far is to create an instance of the given class and then using the autocomplete to see all possible functions. Obviously, this way is cumbersome and takes too much time. Is there a neater way to see all possible functions?


回答1:


If you select the class and right-click and select Find Usages then select Group by type, it will show you usages where the class is Extension receiver type (make sure Group by test/production is unticked if you want to see all the possible extensions together).

e.g.



来源:https://stackoverflow.com/questions/46336835/is-there-a-way-to-show-all-the-extension-functions-of-a-given-kotlin-class-in-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!