JSP formatter

Hello,
I don't quite like the way my JSPs are formatted by IDEA, and would like to
1. find out if there's any plugin out there to do a better formatting, or preferably
2. get an idea of how to create a plugin, that would connect to the "Reformat Code..." menu item, and do my custom formatting for the JSP.
Could you guys point me to the right documentation, or give me ideas on what i'd need to do for this?
Thanks,
Nilesh

4 comments
Comment actions Permalink

Have you played with JSP formatting options already?

0
Comment actions Permalink

What are the JSP formatting options you are referring to? Where can i find them? the only thing i know is the tab/indent part in the Global Code Style.
Thanks,
Nilesh

0
Comment actions Permalink

I think XML or HTML options affects JSP formatting as well. Can you express what aspects of existing formatting not fit your needs?

0
Comment actions Permalink

The JSP reformat is unusable for me in IDEA. I had posted about this a long time ago on the EAP thread (http://www.intellij.net/forums/thread.jspa?threadID=190614), and there has been slow progress on some fronts, but formatting is still horrible.

I just can't use the IDEA JSP formatter because it screws up the indenting too much, esp. where the are placed. I filed a bunch of bugs about this: IDEABKL-4691 JSP: Global Code Style Settings needs a JSP tab for JSP-specific constructs like and blocks IDEABKL-4748 JSP - When copy&pasting a large block of code between jsp pages, it doesn't carry over the imports as it does with Java files IDEADEV-13314 JSP - Private field 'unused' false positive when included JSP fragments use the field. IDEABKL-4387 Exception occured when applying quickfix for NavigationFrame.jsp file IDEADEV-6433 JSP : The Java Indenter and Formatter are completely wrong when is enclosed by a tag. IDEABKL-4686 JSP - auto indent needs to be more robust. It shouldn't fail because of missing %> tag or because of HTML syntax errors that are downstream. IDEADEV-4385 JSP imports layout ->]]></span> Prefer one import statement per page directive selected has no effect.<br/>IDEABKL-4386 JSP - Quickfix 'Simplify' for Constant If Condition and Intetion Invert If Condition throw Exceptions and mangle code<br/><br/>I haven't had time yet, but I'm going to post another post again on the EAP thread about this. This is probably my biggest sore point in IDEA right now. It's up to those of use that doing JSP to raise this issue up with Jetbrains because IntelliJ doesn't have JSP so the Jetbrains developers aren't suffering any pain.</p>

0

Please sign in to leave a comment.