First, Chinese garbled
Window System, when you import new items in Eclipse, you may encounter problems with Chinese garbled characters.
Solution: Change the system default format to GBK to UTF-8. Here are the specific workarounds that you can choose from, depending on your needs.
1. Set the encoding for the entire workspace, which affects the project for the entire workspace.
Setup Steps: Menu bar Window--Preferences--general--Workspace--text file Encoding--other--utf-8, save configuration (Apply and Close).
2. Set the encoding of the project, which affects only the selected items.
Setup step: Select Project Right--Properties--Resource--text file Encoding--other--utf-8, save settings.
3. Set the encoding of individual files, this action only affects the selected files.
Setup step: Select File Right--Properties--Resource--text file Encoding--other--utf-8, save settings.
Second, eclipse shows the number of lines of code, space, and tabs (tab)
Not set before:
Setup Steps: Menu bar Window--Preferences--gerenal--Editors--Text Editors, save settings.
(The number of lines can also be directly used CTRL+F10, then check show line Numbers)
After setting:
Three, set the indentation mode (one tab is four spaces)
Setup steps:
1), Set Indent: Menu bar Window--Preferences--gerenal--Editors--Text editors--insert spaces for tabs, save settings;
2), configure tab to 4 spaces in formatter:
i), menu bar window--Preferences--Java--Code Style--Formatter;
II), create a new file, the configuration is as follows, save;
III), Source-format, for formatting.
Four, automatically delete the line at the end of the space and empty lines (the phenomenon is left to right image)
Setup steps: Window--Preferences--Java--Editor--Save Action-Perform the ...--Additional actions--Configure ...--Re Move trailing whitespace--all lines
V. Common annotations
Setup Steps: Menu bar Window--Preferences--Java--Code Style--code Templates--Comments
1. Files--Edit
/** * @Description: * @Package ${package_name} * @Title: ${file_name} * @author SUCB * @date ${date} */
Files
2, Types--Edit
/** @Description: * @Package ${package_name} * @Title: ${file_name} * @author SUCB * @date ${date} */
Types
3, Methods--Edit
/** * ${tags} * @author SUCB * @date ${date} * *
View Code
Eclipse Basic Settings----Chinese garbled, line number display, indentation method, line end space and blank line automatic deletion, common annotations