Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-2831

Groovy code formatter working poorly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.9.2.RELEASE
    • Fix Version/s: None
    • Component/s: EDITING
    • Environment:
      Windows XP SP3

      Description

      1) Occurence of square bracket List syntax, e.g. [], [var1], [var1, var2], etc., causes formatter to fully stop functioning in any way (including the case when line is commented). Similar Map syntax `[key:value]` doesn't cause such problem. This is extremely annoying and forces to avoid using this elegant syntax.
      2) Formatting doesn't remove redundant spaces, while according to Java formatting settings, it should.
      3) if (condition) action one-liners causes next line to be idented one tab further
      E.g. try to format this code in a new file:

      if (true) break
      something()

      4) Formatting doesn't insert empty lines where is should (again, according to Java formatting settings)

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            frozen_spider Alex Abdugafarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3d
                3d
                Remaining:
                Remaining Estimate - 3d
                3d
                Logged:
                Time Spent - Not Specified
                Not Specified