Use the Java formater

  • IMport the Java formater

Formate file:

1.Coding format configuration file :  Enables you to format your code according to the document by pressing a keyboard shortcut (default is Ctrl-Shift-F).   

  Formate file: cs-formatter.xml

2.Code templates configuration file:  contains templates for automatically inserted comments and templates for newly created files, types, etc.

  Formate file:   codetempaltes.xml

3.Code cleanup configuration file : setup for the code cleanup wizard (default keyboard shortcut is Alt-Shift-S, U). Useful right before creating a diff for a review. Cleans up all spaces at the end of the lines.

  Formate file: Codecleanup.xml

  • Clean up 

Ctrl+A  Choose code > Shift+ALT + S  >  choose Clean Up

     

  • Formate

Ctrl+A  Choose code >  Control + Shift+ F

原文地址:https://www.cnblogs.com/halfacre/p/12938196.html