views:

2560

answers:

3

I know that IntelliJ has an option to select all the code in a JSP file, right click, and select "format". This nicely formats all HTML, CSS, scriptlets and JSTL tags in a JSP file.

Can Eclipse do this?

If not, what is the best free Eclipse plugin that does the same?

+1  A: 

I found this one on eclipse plugin central.

Looks like an all in one kind of formatter. I haven't tried it myself but it might be what you are looking for

NXFormat

mugafuga
Looks good, but not free
Chris Tek
+2  A: 

With the Web Tool Plateform plateform (on eclipse.org website), this is very simple : in the JSP editor tab, right click->source->format (or Shift+Ctrl+F)

Vinze
The formatter in the WTP usually works pretty poorly for me - and I don't think there is any way to configure it like the regular Java formatter.
matt b
yah, the formatter in WTP has broken pages on me numerous times.
Gopherkhan
A: 

Aptana is pretty awesome. I'm pretty sure it has formatting built in.

discgolfer
Unfortunately Aptana does not format the JSP code.
Chris Tek