Java Learning (vii): Codeformat configuration, setting automatic format when save. The format template is attached.

Source: Internet
Author: User

Eclipse adds the Codeformat template (see Attachment).

Windows--preference--java--code Style--format, import the template in the attachment.

--java--editor--save Actions, tick format source code, and the format code will be automatically edited when it is saved. Very convenient.

The format is as follows:

/*** A Sample source file for the Code formatter preview*/ PackageMyPackage;Importjava.util.LinkedList; Public classmyintstack{Private FinalLinkedList Fstack;  PublicMyintstack () {Fstack=NewLinkedList (); }         Public intpop () {return((Integer) Fstack.removefirst ()). Intvalue (); }         Public voidPushintelem) {Fstack.addfirst (NewInteger (elem)); }         Public BooleanIsEmpty () {returnFstack.isempty (); }}

Http://files.cnblogs.com/files/moleme/codeformat.rar

Java Learning (vii): Codeformat configuration, setting automatic format when save. The format template is attached.

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.