Spring Tool Suite
  1. Spring Tool Suite
  2. STS-1992

GSP/Scaffolding template editor adds spurious "Comment not closed" annotations

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1.RELEASE
    • Fix Version/s: 2.8.0.M2
    • Component/s: GRAILS
    • Labels:

      Description

      This issue is copied from https://jira.codehaus.org/browse/GRECLIPSE-1173

      When editing Grails GSP scaffolding templates, I get a lot of spurious annotations in the editor reporting "Comment not closed". These are accompanied by wavy red underlining that can cover most of the file and make it difficult to edit. Hovering on the annotation marker at the edge of the editor, I see:

      Multiple annotations found at this line:
       - Comment not closed
      

      There are no comments in the file (I reported a Grails bug about comments, as the code generator falls over if I insert a GSP comment into a scaffolding template). I'm also not sure how one annotation counts as "Multiple annotations", but perhaps that is part of the cause of the problem.

      The problem happens seemingly at random. The only way I've found to clear the error is to cut the contents of the file and paste it right back again (unchanged). If I insert a HTML/XML comment into the file (which I don't do normally, as they show up in the browser), then I'll sometimes get the same warning and see the first few lines of the comment (but not all lines) underlined. This can happen when the comment is properly closed.

      I have been unable to find a reliable way to reproduce this issue. My suspicion, though, is that it might relate to annotation markers getting "stuck" while I'm typing a comment (or something that is briefly interpreted by the editor as a comment) and then these markers not getting cleared properly. If I deliberately leave a comment open, I get the annotation marker warning me, but I don't get the "Multiple annotations found at this line" bit, just a single "Comment not closed" annotation. Could there be a build up of stray annotation markers happening? Perhaps a code review might uncover something.

        Activity

        Hide
        Andrew Eisenberg (c) added a comment -

        I'm unable to do much on this issue without any further information. Can you attach a gsp file where this has happened to you? Also, do you see any entries in the error log about this? Aso, after you see this problem, can yo right click on the gsp file and select "validate"? Does the error go away?

        Show
        Andrew Eisenberg (c) added a comment - I'm unable to do much on this issue without any further information. Can you attach a gsp file where this has happened to you? Also, do you see any entries in the error log about this? Aso, after you see this problem, can yo right click on the gsp file and select "validate"? Does the error go away?
        Hide
        Andrew Eisenberg (c) added a comment -

        Not able to reproduce. Closing for now, until I can get more information from user.

        Show
        Andrew Eisenberg (c) added a comment - Not able to reproduce. Closing for now, until I can get more information from user.
        Hide
        Andrew Eisenberg (c) added a comment -

        A detailed way of reproducing has been shown on GRECLIPSE-1173. Since I can now reproduce, I am reopening this bug.

        Show
        Andrew Eisenberg (c) added a comment - A detailed way of reproducing has been shown on GRECLIPSE-1173. Since I can now reproduce, I am reopening this bug.
        Hide
        Andrew Eisenberg (c) added a comment -

        See final comment on the related greclipse issue. The problem is now fixed

        Show
        Andrew Eisenberg (c) added a comment - See final comment on the related greclipse issue. The problem is now fixed

          People

          • Assignee:
            Andrew Eisenberg (c)
            Reporter:
            Andrew Eisenberg (c)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: