Code completion in groovlets?

87 Views Asked by At

Why doesn't eclipse provide proper code completion for implicit objects in a groovlet -

enter image description here

1

There are 1 best solutions below

0
kdabir On

html is an instance of MarkupBuilder and although one might think it has all the html methods (h1, pre so on), it does not have any such method. It just generates the tag by the name of method. So in effect html.sillyvalue() is also valid and would result in `' tag. Is such case autocompletion is not possible.

To alleviate the problem you can provide DSLD files (which you might already be aware of). this is quite interesting blog on the topic: http://en.appsatori.eu/2011/05/writing-groovy-dsl-descriptors-dsld-for.html