Details
Description
In order to help IDE processing of GSP tags, it would be helpful to have specially formatted GroovyDoc, so that a tag description and potential attributes are properly described. Here is a suggestion:
/** * This is a description of the tag. It * will appear when selecting the tag in * hovers, content assist, etc. * * @attr myAttr This is an optional attribute * and this description will appear in hovers, * etc. * * @attr myAttr2 REQUIRED This is a required attribute * It will appear by default when this tag is selected * in content assist. ("REQUIRED" can be case-insensitive) */ def myTag = { }
From Grails' point of view, we just need to standardize a recommended format for GroovyDoc on tags. Then IDEs can parse the GroovyDoc and provide the proper support.
From my point of view, the above contains all the information I need, but I am open to other suggestions on what format the doc should take.
And I forgot to mention that this kind of GroovyDoc would be optional. If it's not there, STS will still do a best effort guess at what the attrs are. Also, if descriptions are missing (ie- just tag names and nothing else), then that wouldn't be a problem either.