Announcement Announcement Module
Collapse
No announcement yet.
STS 3.0.0: Format Bug Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS 3.0.0: Format Bug

    Format (Ctrl + Shift + F) under Source menu has bug, specifically in HTML files. I don't know if there is a setting that must be made to format (alignment, tabbing) the codes just like what it does in STS 2.9.2.

    Here is an example, the original code is like this (which is under a script tag, inline javascript):

    Code:
    +"<td><center><img src=\"images/table_delete.png\" width=\"16\" height=\"16\"></center></td>"+"</tr>");
    In STS 2.9.2 the above code will be tabbed correctly:

    Code:
    																	+ "<td><center><img src=\"images/table_delete.png\" width=\"16\" height=\"16\"></center></td>"
    																	+ "</tr>");
    In the case of STS 3.0.0 it looks like this:

    Code:
    																	+ "_$tag_________________________$ta_$tag____$tag_____________________________________________________________________________$tag_____$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag____$tag__________________________________________________________$tag_____$tag_$ta_$tag_________________________$ta_$tag____$tag_____________________________________________________________________________$tag_____$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag____$tag__________________________________________________________$tag_____$tag_$ta_$tag____$tag_________________________$ta_$tag____$tag_____________________________________________________________________________$tag_____$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag____$tag__________________________________________________________$tag_____$tag_$ta_$tag____$tag____________________________________________________________$tag_________________________$ta_$tag____$tag_____________________________________________________________________________$tag_____$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag____$tag__________________________________________________________$tag_____$tag_$ta_$tag____$tag____________________________________________________________$tag_____$tag_________________________$ta_$tag____$tag_____________________________________________________________________________$tag_____$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag____$tag__________________________________________________________$tag_____$tag_$ta_$tag____$tag____________________________________________________________$tag_____$tag"
    																	+ "_$tag_________________________$ta_$tag____$tag_____________________________________________________________________________$tag_____$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag_$ta_$tag____$tag__________________________________________________________$tag_____$tag_$ta_$tag____$tag____________________________________________________________$tag_____$tag_$tag");
    It is just annoying to be like this all the time, all tags are formatted correctly while others are replaced with random spelling of "$tag" and underscores.

    I hope you have an answer for this

  • #2
    Hey!

    This looks a lot like a bug in the HTML formatting code, since the insertion of "$tag" is really strange. Can you attach a sample HTML file that reproduces the problem, so that I can open a bug against the Eclipse WTP for this?

    Thanks!
    -Martin

    Comment


    • #3
      Thanks sir Lippert for reply. I have attached the sample html files with this post. I have changed the file extension to .txt because your server says html file is invalid for uploading . Kindly change it to html then download the jquery js dependecy for some testing.

      I think this has something to do with the jquery javascript, also, there can be unsupported rulings (like using the $(function(){}) inside Eclipse Juno itself when formatting the codes, specifically in html files...

      Regards,
      atan
      Last edited by atan742; Aug 28th, 2012, 03:29 AM.

      Comment


      • #4
        Hey Atan!

        Thanks for the sample files, I created a bug report at Eclipse to get this fixed:
        https://bugs.eclipse.org/bugs/show_bug.cgi?id=388340

        Cheers,
        -Martin

        Comment


        • #5
          Sir, thanks for the report. I've checked the link you provided. The bug was already fixed but I don't know how to patch the said JsTranslator.java which has the said bug. Is there a download needed or where could I find that JsTranslator.java file in the STS folder?

          -atan

          Comment


          • #6
            Hey!

            Patching that yourself is a bit difficult, you would need to do quite a lot of stuff. I would recommend to wait for STS 3.1.0, which will be based on Juno SR1 (comes out end of September) where this bug is fixed. If you need the bug earlier, you could try to install an update from one of the nightly builds of WTP. But the easiest way would be to wait for Juno SR1.

            HTH,
            -Martin

            Comment

            Working...
            X