views:

27

answers:

1

Eclipse has a huge number of formatting rules for Java and Javascripting, which can be reached via "code-style" option under java and javascript. I couldn't find any JSP settings for formatting rules. Is there any? I could find a few basic setting in Web->JSP Files->Editor which redirects to Web->Html->Editor and Web->XML->Editor. This options include splitting attributes, clean blank lines, whitespace paddingand indentation style (tabs/spaces). I can confirm that the XML settings are used when formatting JSP pages. HTML editor is used only for the lenght of line.

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

thanks Emerson

A: 

The xml formatting configuration IS exported through File->Export->General-Preferences. Just made a test comparing the exported file before and after changing the indentation size an char, and the following settings were changed in the exported file:

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

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

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

Emerson