Menu

#135 Format Java scriptlets inside JSP files <% %>

open
5
2003-11-17
2003-11-14
sean
No

Make JavaStyle plugin for jEdit able to format java code
in JSP files in scriptlet tags:
<% statements; %>
<%! declarations() {} %>
<%@ directives %>
<%= expressions %>

(<%@ %> does not contain java-language code, but the
normal java formatting rules can apply to the others)

Discussion

  • Mike Atkinson

    Mike Atkinson - 2003-11-17
    • assigned_to: nobody --> mikeatkinson
     
  • Mike Atkinson

    Mike Atkinson - 2003-11-17

    Logged In: YES
    user_id=476481

    It should be fairly easy to select the text between <% and
    %> and then pass this to a JavaParser instance.

     
  • Mike Atkinson

    Mike Atkinson - 2003-11-17

    Logged In: YES
    user_id=476481

    This is quite hard as <% statements %> do not have to form
    blocks, like:

    <% public void someMethod() {
    int x = 10;
    %>
    ...

    <% } %>

    I'll have to keep a track of what source comes from each
    scriptlet, reformat it as a whole then distribute back to
    the scriptlets. Not impossible (as long as no sorting
    occurs), but involving a lot of book-keeping.

    I don't think the expressions need formatting.

     

Log in to post a comment.

MongoDB Logo MongoDB