如何更改在 Kotlin 上生成的函数 TODO() 的主体? [英] How to change body of function TODO() generated on Kotlin?
本文介绍了如何更改在 Kotlin 上生成的函数 TODO() 的主体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在我的代码上留下一些事情要做,并且 TODO()
自动生成会产生一个很长的评论,如 follow
I need leave something to do later on my code and TODO()
auto generated produces a very long comment like follow
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
上面一行告诉我去File ->设置 ->File Template
来改变它,但这个选项不存在于 TODO()
函数.如何解决?
The above line tell me to go to File -> Setting -> File Template
to change it, but this option not exists to TODO()
functions. How to solve it?
推荐答案
转到 Android Studio 的 Preferences 窗口,选择 Editor ->文件和代码模板
,打开Code
标签,你会在那里找到一个New Kotlin Function Body
选项,你可以自定义.
Go to the Preferences window in Android Studio, select Editor -> File and Code Templates
, open the Code
tab, there you will find an option for New Kotlin Function Body
which you can customize.
这篇关于如何更改在 Kotlin 上生成的函数 TODO() 的主体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文