In eclipse, we usually use Ctrl + Shift + F to format and adjustCodeAfter formatting, it can be used well in Java/C/CPP files, but in JSP pages, CTRL + Shift + F is not satisfactory, especially for Java code in <%>, sometimes it can be described as a mess (Sometimes it is better to put Java code at the front of the page ), in short, it is very troublesome to format the code in JSP, and we hope this problem can be solved urgently.
By accident, you can choose to format the eclipse code in addition to Ctrl + Shift + F. Right-click and choose source> Format active elements (format dynamic elements ), in the past, eclipse separated formatting, which is not as convenient as netbean; the eclipse hotkey is Ctrl + I,Move the cursor to the front of the Java code in JSP,Select this menu or press the hotkey
CTRL + I: the code is formatted. In JSP, the effect is better than Ctrl + Shift + F.
In addition, this issue is better after the release of the eclipse Kepler version.