When you write Java code in Eclipse and Myelipse, it is time-saving and labor-efficient to use ctrl+shift+f shortcut keys, and the layout code is beautiful and hierarchical, but when we write JSP or HTML code, it is extremely ugly to use this shortcut to compose.
Such as
A row displays multiple labels at the same time, and the code automatically branches as long as it grows. This is very inconvenient in the course of our debugging, so what should we do? Does it have to be manually formatted yourself?
We have a two-point requirement:
1 is want to display only one label in a row
2 is the hope that the long dot code can not be branch
The workaround is to:
This is resolved in the MyEclipse:
Click on the Window tab of the MyEclipse menu bar to find the drop-down perferences option, and enter HTML in the shortcut "Search" box, as
In the number 3 where the line-width is set to how many characters are inside the current line, the line will be wrapped. This number is random, and here's an example of 100.
Next in the number 4 There (that is, inline Elements you want a row to display a LABEL element removed) removed, generally a, Li, label, input, SELECT,DL, Div, etc. these commonly used nesting the label of the other label.
Click OK after you finish, and then in the JSP or HTML page that you want to format, if you want to format the entire page Ctrl + A Select page and then press CTRL + SHIFT + Fto format the entire page. If you do not select all, by default CTRL + SHIFT + F is the entire page that is currently being edited.
If you want to format it locally, select the part you want to format with your mouse and press CTRL + SHIFT + F .
After you're done, this is the effect:
This is resolved in eclipse:
Click on the Window tab of the Eclipse menu bar to find the dropdown perferences option and enter the HTML in the Quick Search box.
:
In the number 3 where the line-width is set to how many characters are inside the current line, the line will be wrapped. This number is random, and here's an example of 100.
Next , in the number 4 (that is, inline Elements you want a row to display a LABEL element removed) removed, usually a, Li, label, input, Select,dl, div and so on these common tags that nest other labels.
Click OK after you finish, and then in the JSP or HTML page that you want to format, if you want to format the entire page Ctrl + A Select page and then press CTRL + SHIFT + F to format the entire page. If you do not select all, by default CTRL + SHIFT + F is the entire page that is currently being edited.
If you want to format it locally, select the part you want to format with your mouse and press CTRL + SHIFT + F.
After you're done, this is the effect:
Resolves an issue where Eclipse and MyEclipse automatically format ugly when editing pages such as html,jsp