JSP Formatting Rules in Eclipse

Eclipse has a huge number of formatting rules for Java and Javascripting, which can be achieved using the "code-style" option under java and javascript. I could not find any JSP settings for formatting rules. Whether there is a?

I can find some basic settings in Web-> JSP Files-> Editor, which are redirected to Web-> Html-> Editor and Web-> XML-> Editor. These options include splitting attributes, blank lines, whitespace, and indentation style (tabs / spaces). I can confirm that the XML parameters are used when formatting JSP pages. The HTML editor is used only for line length.

Also, how can I export these parameters? Are they exported via File-> Export-> General-Preferences?

+3
source share
1 answer

The xml IS formatting configuration is exported via File-> Export-> General-Preferences. Just ran a test comparing the exported file before and after changing the size of the indent char, and the following changes were made to the exported file:

/instance/org.eclipse.wst.xml.core/indentationSize=2 /instance/org.eclipse.wst.xml.core/indentationChar=space

Also html formatting is exported, here is the setting changed when I changed the line width for html:

/instance/org.eclipse.wst.html.core/lineWidth=132

+1

Source: https://habr.com/ru/post/1755351/


All Articles