Steps for configuring editor code format and XML format in eclipse

Source: Internet
Author: User
Document directory
  • 1. Editor code format Configuration
  • 2. XML code format Configuration
  • 3. Description
  • 4. Eclipse text format settings
  • 5. The eclipse Code cannot be displayed.
1. Editor code format Configuration

On the eclipse menu bar, click window-preferences to open the preferences setting window. Select the Java option-code style-formatter on the left to open the formatter tab on the right;

Method 1: reedit the existing active profile configuration file and click Edit/remove.

Method 2: New profile or import external profile existed, then edit the profile. We can also export our active profile.

PS: general class, method declaration, enumeration, etc., {} Each starts with another line, and you can check and select the two tabs braces/new lines;

2. XML code format Configuration

Similar to the editor operation, click window-preferences in the eclipse menu bar to open the preferences setting window: select XML option-XML files-editor on the left to open the editor tab on the right;

In formatter area, select and configure. Line width is the width of a line in the Code. Select an item.

PS: The first spilt multiple option sets the branch display, indent using tabs sets the tab to the tab, and indent using spaces 4 sets the tab to use four spaces;

3. Description

Different projects have different conventions, so we can configure my profile at any time according to the above steps. In actual work, I will encounter and solve many classic problems and technical points. This is my first article on csdn.

We hope that many technical friends will support this and will continue to write more technical articles in the future.

 

4. Eclipse text format settings

Click window-preferences in the eclipse menu bar to open the preferences setting window: select general options-Editors-text editors on the left to open the text editors tab on the right;

Text editors.

 

5. The eclipse Code cannot be displayed.

Cause: the shortcut key settings are incorrect. By default, content assist (CTRL + space) and word completion (Alt +/) are displayed /).

Solution: Click window-preferences in the eclipse menu bar to open the preferences setting window: select general option-keys on the left. Unband word completion (Alt + /)

Command; Content assist (CTRL + space) to Alt + /.

Codepromotehelper

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.