Android Studio Custom Comment template and build Javadoc

Source: Internet
Author: User

Just started learning Android, using the Android Studio IDE. For future production of Javadoc, learn how to customize the comment template.

. Custom comment Templates

1. Open the Settings panel via file–>settings or HotKey Ctrl + Alt + S, as

2. Click Live Templates under Editor. For example, the default templates and shortcut keys provided by Android Studio for developers are shown.

3. In order to customize the comment template, click "+" in the upper right corner, select template group to create a custom template group

4. Select the Created template Group, click "+", select Live template to create a custom template

5. Select the Templat that you created, such as. Enter a string within abbreviation, such as Decl. Fill in the description information within the description.

6. Click on the define below the template text input box, select the function of the shortcut key, select Declaration, enter decl after the functions and press ENTER to produce comments by template

7. Enter a custom comment template within the template text, $xxx $ this type of variable can be set by using the edit variables

8. If you want to generate JAVADOC, write the function annotation template according to the rules, the rules can refer to editor–> Code Style–>java–>javadoc

9. Click Tools–>generate JavaDoc to generate the Java DOC

10. If the Java Doc production fails, check if the Include JDK and library sources In–sourcepath are checked.

Other command line arguments, set the Bootclasspath and encoding of the Android SDK

1.-bootclasspath D:\AndroidSDK\sdk\platforms\android-23

2.-encoding Utf-8

3.-charset Utf-8

Android Studio Custom Comment template and build Javadoc

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.