facebook

indentation in JSPs does not work as expected [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #201912 Reply

    tisc
    Member

    When writing JSPs, the indentation is buggy:

      indentation is set to 2 spaces, no tabs but I get a tab when selecting some Java code and pressing TAB
      Undoing an indentation does not work – it looks like every 2nd line gets unindented

    Platform: MyEclipse 3.7RC2 on fresh Eclipse 3.0M6 under Linux

    Bye, Tino.

    #201919 Reply

    Riyad Kalla
    Member

    Tino,
    It seems these bugs are still prevelant in the JSP editor, thank you for letting us know.

    #201984 Reply

    tisc
    Member

    Actually, Undoing an indentation is quite dangerous since it scatters whitespace all over the place.

    #202831 Reply

    mvhegde
    Member

    I found another problem with JSP formating.

    My source code (jsp etc)lives in Linux. I setup the project (eclipse – myeclipse) in windows xp in another box
    and use samba mount to access jsps. If I try to format jsps from inside myeclipse it puts all the html code lines in a
    single line. Doesn’t affect the embedded java code (they preserve lines).
    The problem is with end of line character difference between windows and Linux or any Unix OS.
    So if I use unix2dos command on Linux box and convert the JSP to windows format and try to format again
    it works fine. But it is a pain to convert every single JSP like that.

    Note: eclipse JDT provides file type conversion between different Operating Systems
    (Menu Source ->Convert Line Delimiters To->Windows/Unix/Mac. But it is not available for myeclipse perspective
    or on JSPs.

    Thanks
    Manju

    #202841 Reply

    support-michael
    Keymaster

    I believe the problem you are experiencing is that ME is adopting the EOL conventions of the platform (XP) and has no knowledge that your mounting a filesystem of a different OS (Linux). If ME supported the Menu Source ->Convert Line Delimiters To->Windows/Unix/Mac will this be sufficient for your conversion purposes?

    #202879 Reply

    mvhegde
    Member

    Eclipse preserves the line endings of whatever OS the java file belongs, and still formats very nicely.
    I would like to see the same behaviour with ME on jsp/xml. But till then or if it is too much work
    I’m OK with the solution of ME supporting the Menu Source ->Convert Line Delimiters To->Windows/Unix/Mac

    Thanks
    Manju

    #204428 Reply

    Riyad Kalla
    Member

    Michael,
    Can you update us on the status of this since 2.7 GA?

    #204443 Reply

    Scott Anderson
    Participant

    Taken care of in 2.7GA.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: indentation in JSPs does not work as expected [Closed]

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