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:
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.