This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If GSP page contains a taglib tag then formatting breaks, for example: <html> <body> <g:if test="${some expression}"> <h1>Sample line</h1> </g:if> </body> </html> expected: <html> <body> <g:if test="${some expression}"> <h1>Sample line</h1> </g:if> </body> </html>
Created attachment 94249 [details] Screenshots of GSP formatting with JetBrains Idea and Netbeans Format and indent working but provides invalid structure. Moreover Netbeans highlinging page directive as error. And code completion is not working too. Is it a bug or smth need to be fixed in my settings or Netbeans does not provide such features. In this archive you can find screenshots of the code. First it was indented with IntelliJIdea and then reformated with Netbeans. You can notice invalid indentation near <g: .../> tags.
This is indeed quite a frustrating bug. As you type return, it re-indents <g: tags (or the lines immediately after them) incorrectly. Also if you ask NetBeans to auto format the file, it does the same and messes up your file. Given that the vast majority of individuals doing Grails development with NetBeans are going to run into this bug, I was rather surprised to find it in the 6.9 release.
Reassigning to Groovy where it belongs. BTW, both of the attached screenshots are from NetBeans, can you attach the IDEA screenshot again? Thanks.
Created attachment 104735 [details] Screenshots submitted by the user offline.
I agree this is annoying, but IMO not P1 priority, as there is a workaround; see also the bug priority guidelines: http://wiki.netbeans.org/BugPriorityGuidelines
I don't think formatting issue is of a P2 priority.
Still valid issue --> Changing TM to 7.2
*** Bug 187490 has been marked as a duplicate of this bug. ***
GspIndentTask class from groovy.gsp module might be the reason.
Setting TM = Next, this will be fixed together with a new GSP lexer.
Fixed in: http://hg.netbeans.org/web-main/rev/d7a619844f78 It's only a part of the development sources, so please anyone interested in the change, use daily builds instead of newly incoming NB73.
Integrated into 'main-golden', will be available in build *201301150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d7a619844f78 User: Martin Janicek <mjanicek@netbeans.org> Log: Rewriting GSP lexer, indenter and the braces matcher as a fix for issues #153424, #168004, #202248, #202249 and #209989