Android Studio Migration Code style with comment template

Source: Internet
Author: User

In using as, feel the system comes with the color of the font is not what you want, so you want to configure a favorite font style, the steps are as follows: (working environment is ubuntu14.10,as for 1.3.2)

1. Click File--->settings--->editor---->colors & Fonts, click Save As---> Rename (example Ljstyle)

2. You can then select Java in the Colors & Fonts drop-down list to configure the color you want.

3. When you need to import this configuration into the other device's as, click File--->export Settings, the following dialog box appears:

The edit box is the path you need to settings.jar the package, the check box in the dialog box is the other configuration you need to export, you need to tick, because the path of jdk,sdk,git must be different.

Click OK to export it and get the Settings.jar package.

4. When you have the Settings.jar package, you can import this jar package. In the other device as, click File-->import Settings ..., find the path to your Settings.jar package, import it so that your code styling style is imported into the as of this device.

5. Finally, many people are already familiar with Eclipse's annotation template, so it is also necessary to edit a comment template in as. The same file--->settings---->editor below:

Click File and Code Templates, select Class under Templates on the Right tab, and then click File Header under includes:

On the right, you can edit the comment template generated by each Java class.

Example:

/**
*
* Name: ${name}
* Author: ${user}
* Email:
* Comment://todo
* Date: ${year}-${month}-${day} ${hour}:${minute}
*
*/

The others can be modified on their own. As for the method of the annotation template, you should also be able to edit the changes, I do not find the younger brother, such as the great God, hope pointing twos.

Thank you for reading and good luck!

Android Studio Migration Code style with comment template

Related Article

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.