如何更改在Kotlin上生成的函数TODO()? [英] How to change body of function TODO() generated on Kotlin?

查看:263
本文介绍了如何更改在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 -> Setting -> 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中的首选项"窗口,选择Editor -> File and Code Templates,打开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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆