facebook

Opening and closing tags on separate lines

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #320851 Reply

    Greg
    Participant

    I can’t seem to find where I can change which elements put opening and closing tags on the same line and which elements go on different lines when I use the auto-format feature in my jsp files.

    Really I am trying to keep my td tags from auto formatting to a single line. For example, I have the code:

    <table>
        <tr>
            <td>
                Stuff
            </td>
        </tr>
    </table>

    when I use auto format it changes it to:

    <table>
        <tr>
            <td>Stuff</td>
        </tr>
    </table>

    In the above sample it doesn’t make that much of a difference but when I add a lot of content to my td tags it makes it a little cluttered. How can I change this behavior?

    #320854 Reply

    support-swapna
    Moderator

    gmascherino ,

    Can you answer some more questions for us ?

    1) Which version of MyEclipse are you working with ?

    2) This is how the auto format works in Eclipse 3.7. You will see the same behavior in MyEclipse 10 as it is based on Eclipse 3.7. I am afraid there is no parameter to configure for this particular scenario.

    3) You can configure your own formatter. Here is the link with detailed instructions :
    http://www.wikihow.com/Change-the-Default-Format-Settings-in-Eclipse

    For JSP formatting , you can configure parameters in Windows > Preferences > MyEclipse > Files and Editors > JSP > JSP Source. Click on the link for your kind of JSP (HTML or XML content).

    #320909 Reply

    Greg
    Participant

    I just upgraded to MyEclipse 10. I was using 9.1 and it was auto-formatting correctly.

    #320924 Reply

    support-swapna
    Moderator

    gmascherino ,

    Its the Eclipse feature which has changed in this respect in Eclipse 3.7. I am afraid we would not be able to help in this case.

    Do let us know if you have any other issues.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Opening and closing tags on separate lines

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