IntelliJ formatting of Java and XML

Source: Internet
Author: User

Using IntelliJ this time, has been looking for some skills, and constantly improve its proficiency. Let's tell you a little secret and take a look at the thrill of IntelliJ's semi-automatic format code. To use this feature you also have to install a plug-in--eclipse Code Formatter, which can be installed online from the IntelliJ warehouse, but this speed is really not flattering, so here is a network disk.
* Eclipse Code formatter Download:Http://pan.baidu.com/s/1dD8NCBJ
① Installing the Eclipse Code Formatter plugin:
Install the words, do not want more nonsense, simply mention.
File->settings->plugins->install plugin from disk
② enable eclipse Code Formatter
File->settings->other tools->eclipse Code formatter->use the Eclipse code Formatter
Two x Browser keys select a previous Eclipse workspace project directory. Settings/org.eclipse.jdt.core.prefs, OK, or the last picture.



Here you can format the Java code toformatting XML has to go on.Look down.
③ Next is relatively simple, point two is OK.
  
Settings->editor->code Style->xml
Switch to the Arrangement tab and click on the rightmost small Set from ... Such as

④ Direct OK to complete.
⑤ back to the editor to open a layout file, write the code to try, after writing the first time to remember to use the shortcut key ctrl+alt+shift+l, call out the reformat action option, such as tick, again format the XML, the label's properties will be reflow.

OK, here we are, tired ...

* Refer to the official blog:
http://blog.jetbrains.com/idea/2013/10/rearrange-attributes-in-android-xml-files-with-intellij-idea-13/


IntelliJ formatting of Java and XML

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.