如何在Android Studio中创建更多注释,例如TODO,例如CHECK或TEST? [英] How to create more notes like TODO in Android Studio, for example CHECK or TEST?

查看:196
本文介绍了如何在Android Studio中创建更多注释,例如TODO,例如CHECK或TEST?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何在Android Studio中创建类似于"TODO"的新标签吗?我的意思是,它们也将突出显示并出现在问题列表中. 我将不胜感激任何提示或建议.

Does anybody know how to create new tags similar to the "TODO" in Android Studio? I mean so that they would highlight as well and appear in the list of issues. I'd appreciate any tip or suggestion.

推荐答案

是的,这是可能的. Android Studio基于IntelliJ,您可以在此处找到有关如何添加新模式的说明:

Yes, this is possible. Android Studio is based on IntelliJ and you can find a instruction on how to add a new pattern here:

https://www.jetbrains.com/help/idea/defining-todo-patterns-and-filters.html

通过链接:

  1. 在待办事项"工具窗口中,单击筛选待办事项"图标(筛选待办事项"),然后单击编辑筛选器"以打开待办事项"对话框.

  1. In the TODO tool window, click the Filter TODO Items icon (Filter TODO Items) and then click Edit Filters to open the TODO dialog.

要为OPTIMIZE项添加模式,请在TODO对话框的模式"部分中单击添加"图标(添加),然后键入以下模式:\ boptimize \ b.*,然后单击确定"以保存新的模式.

To add a pattern for the OPTIMIZE items, click the Add icon (Add) in the Patterns section of the TODO dialog, and type the following pattern: \boptimize\b.* Then click OK to save the new pattern.

要添加具有新模式的过滤器,请在TODO对话框的过滤器"部分中单击添加"图标(添加),为新过滤器指定名称,然后选择要包含在此过滤器中的新模式.然后单击确定"以保存新的过滤器.

To add a filter with the new pattern, click the Add icon (Add) in the Filters section of the TODO dialog, specify a name for the new filter, and select the new pattern to be included in this filter. Then click OK to save the new filter.

单击确定"以在"TODO"对话框中应用更改.

Click OK to apply changes in the TODO dialog.

要应用新的过滤器,请在TODO工具窗口中,单击过滤待办事项"图标(过滤待办事项"),然后选择必要的过滤器.

To apply the new filter, in the TODO tool window, click the Filter TODO Items icon (Filter TODO Items) and select the necessary filter.

这篇关于如何在Android Studio中创建更多注释,例如TODO,例如CHECK或TEST?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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