facebook

JSP Formatting and script tags

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #313388 Reply

    ess008
    Member

    Hi, I’m using the MyEclipse JSP Editor to format my JSPs. I’ve specified 720 characters for wrapping, and all elements seem to be following this rule except the script tags. The closing tag always has no indent. How can I fix this?

    Here’s an example:

    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <head>
            <title>Style Reference</title>
            <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
            <link href="style.css" type="text/css" rel="stylesheet" />
            <script type="text/javascript" src="js/common.js">
    </script>
            <script type="text/javascript" src="js/autoTab.js">
    </script>
        </head>
        <body>
            <div style="margin: 20px;" id="main">
                <h1>
    ...
    
    #313390 Reply

    support-swapna
    Moderator

    ess008,

    I am unable tor replicate it at my end.

    Please copy paste your installation details here from MyEclipse > Installation Summary > Installation Details.
    Do you see any errors logged in .log file located at <workspace dir>/.metadata folder? If yes then paste them here for me.

    #313404 Reply

    ess008
    Member

    Thanks for the response.

    The HTML Source and XML Source settings are set on the defaults, except for Line width: 720

    Installation details:

    
    *** Date: 
    Wednesday, December 22, 2010 10:52:23 AM CST
    
    ** System properties:
    OS=WindowsXP
    OS version=5.1.0
    Java version=1.6.0_13
    
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 8.6.1
    Build id: 8.6.1-20101117
    
    
    *** Eclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 8.6.1
    Build id: 8.6.1-20101117
    
    
    
    
    
    
    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files\Genuitec\MyEclipse 8.5\myeclipse.exe
    -name
    Myeclipse
    --launcher.library
    C:\Program Files\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
    -startup
    C:\Program Files\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    -install
    C:/Program Files/Genuitec/MyEclipse 8.5
    -configuration
    configuration
    -vm
    C:/Program Files/Genuitec/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/jre/bin/client/jvm.dll
    

    Here’s a full JSP after formatting:

    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <head>
            <title>MyHtml.html</title>
            <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
            <script type="text/javascript" src="js/common.js">
    </script>
            <script type="text/javascript" src="js/autoTab.js">
    </script>
        </head>
        <body>
            <p>
                This is my HTML page.
            </p>
            <table class="scrolling">
                <thead>
                    <tr>
                        <th>
                            foo
                        </th>
                        <th>
                            foo
                        </th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <td>
                            foo
                        </td>
                        <td>
                            foo
                        </td>
                    </tr>
                </tfoot>
                <tbody>
                    <tr>
                        <td>
                            foo
                        </td>
                        <td>
                            foo
                        </td>
                    </tr>
                </tbody>
            </table>
        </body>
    </html>
    
    #313410 Reply

    support-swapna
    Moderator

    ess008,

    Thanks for the details.

    I could replicate it at my end. I will raise a PR for the dev team.

    #313517 Reply

    ess008
    Member

    Thanks. Can you please create a post here when it gets resolved?

    #313521 Reply

    support-swapna
    Moderator

    ess008,

    I will try to do.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: JSP Formatting and script tags

You must be logged in to post in the forum log in