Intellij format java and xml, intellijjavaxml

Source: Internet
Author: User

Intellij format java and xml, intellijjavaxml

During the time when Intellij was used, I have been searching for some skills to continuously improve my proficiency in it. Next, let us know a little bit about how Intellij semi-automated code formatting is supported. To use this function, You have to install the plug-in Eclipse Code Formatter, which can be installed online from the Intellij repository. However, this speed is not flattering, so a network disk is provided here.
* Download Eclipse Code Formatter:Http://pan.baidu.com/s/1dD8NCBJ
① Install the Eclipse Code Formatter plug-in:
If you don't want to talk about installation, simply mention it.
File-> Settings-> Plugins-> Install plugin from disk
② Enable Eclipse Code Formatter
File-> Settings-> Other Tools-> Eclipse Code Formatter-> Use the Eclipse Code Formatter
Select a previous Eclipse Workspace project directory for both Browser buttons. Settings/org. eclipse. jdt. core. prefs, OK, or the previous figure.



You can format the java code here.You have to continue formatting XML.Look down.
③ Next it will be relatively simple. Click it twice and then OK.
  
Settings-> Editor-> Code Style-> XML
Switch to the Arrangement tab and click the rightmost character Set from..., as shown in figure

④ Directly OK.
⑤ Return to the editor to open a layout file and try to write some code. After writing, remember to use the shortcut key Ctrl + Alt + Shift + L for the first formatting, and call out the Reformat Action option, as shown in the check box, when you format the XML file again, the tag attributes are rearranged.

Okay, that's it. Tired...

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


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.