有没有办法在Intellij IDE中显示给定Kotlin类的所有扩展功能? [英] Is there a way to show all the extension functions of a given Kotlin class in Intellij IDE?
问题描述
到目前为止,我发现的唯一方法是创建给定类的实例,然后使用自动完成功能查看所有可能的功能.显然,这种方式很麻烦并且需要太多时间.有没有更整洁的方法来查看所有可能的功能?
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?
推荐答案
如果选择该类并右键单击并选择Find Usages
,然后选择Group by type
,它将向您显示该类为Extension receiver type
的用法(如果要一起查看所有可能的扩展名,请确保未选中Group by test/production
.
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).
例如
这篇关于有没有办法在Intellij IDE中显示给定Kotlin类的所有扩展功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!