Android的工作室:如何删除/更新"创建者"评论添加到所有新的类? [英] Android Studio: how to remove/update the "Created by" comment added to all new classes?

查看:217
本文介绍了Android的工作室:如何删除/更新"创建者"评论添加到所有新的类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是默认的Andr​​oid Studio会自动添加到所有新的班头注释,例如

By default Android Studio automatically adds a header comment to all new classes, e.g.

/**
 * Created by Dan on 11/20/13.
 */

在哪里是定制或删除它的设置?

Where is the setting to customize or remove it?

推荐答案

从菜单栏:


  • 在Mac OS选择 Android的工作室 - > preferences

  • 在Windows和Linux
  • 选择文件 - > 设置

  • on Mac OS choose Android Studio -> Preferences
  • on Windows and Linux choose File -> Settings

然后寻找编辑 - > 文件和code模板在左侧窗格中

Then look for Editor -> File and Code Templates in the left hand pane.

您有两种方法可以改变这个...

You have two ways you can change this...

1)选择包括标签并编辑创建者... 文本直接。

1) Select the Includes tab and edit the Created by... text directly.

2)选择模板设置页并编辑 #parse(文件Header.java)行你想要的任何模板。

2) Select the Templates tab and edit the #parse("File Header.java") line for any template that you desire.

我个人跟着选项1)和由默认标题评论一个TODO,例如

Personally I followed option 1) and made the default header comment a TODO, e.g.

/**
 * TODO: Add a class header comment!
 */

这些说明是基于Android工作室v0.3.7。同时也测试了v1.2.1.1

These instructions are based on Android Studio v0.3.7. and also tested on v1.2.1.1

这篇关于Android的工作室:如何删除/更新"创建者"评论添加到所有新的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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