As mentioned in the Java Code Specification, tab is actually 8 characters, so we can use 4 spaces (4 characters) instead of tab, which reduces the storage size of the code and provides an aesthetically pleasing code.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/B1/wKiom1TcFxvj5NddAADamixE3aU997.jpg "style=" float: none; "title=" Reference.png "alt=" Wkiom1tcfxvj5nddaadamixe3au997.jpg "/>
So modifying the encoding format of Eclipse helps us to replace it without changing our habits.
The steps are as follows:
When editing, the tab is replaced. Text Editors, Editors, General, Windows-Preferences, select the Insert spaces for tabs.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/AD/wKioL1TcGBKyCduvAAQyhp4EV-w036.jpg "title=" Text-editor.png "style=" Float:none; "alt=" wkiol1tcgbkycduvaaqyhp4ev-w036.jpg "/>
Replace the tab with CTRL + Shift + F when formatting the code. Preferences, Java, Code style, Formmater, Windows----Active profile Select a formatting style, and then click Edit. In the Indentation tab, locate the general settings and select Spaces only in the tab policy.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/B1/wKiom1TcFxyzn-5qAAQG9i7JQlE677.jpg "title=" Formatter.png "style=" Float:none; "alt=" wkiom1tcfxyzn-5qaaqg9i7jqle677.jpg "/>
If the following occurs after selection, return to active profile, then click on the new one to enter the name at random. Then select the new profile and do the above.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/AD/wKioL1TcGBLxogIgAAUVDNeHXa8145.jpg "title=" Error.png "style=" Float:none; "alt=" wkiol1tcgblxogigaauvdnehxa8145.jpg "/>
This article is from the "Sg-yyz" blog, make sure to keep this source http://sgyyz.blog.51cto.com/5069360/1613955
Eclipse uses 4 spaces instead of tab