views:

185

answers:

1

I want to have full code autocompletion. I managed to add core/grails/spring taglibs so that STS does autocomplete tags for me in gsp files. What i want to do now is do same thing for my own custom tag libs. If i create tag lib descriptor by hand and put it in tld folder i can add include to my gsp file like this

<%@   taglib prefix="p" uri="/web-app/WEB-INF/tld/pk.tld" %>

then it all works perfect! bit hassle to add them to each gsp file but i could live with it if i get auto complete.

Question: is there any way to generate tld file based on the grails taglib? attributes are dynamic in a hashmap but i could declare them some way as i want to control if all/correct attributes are used any way.

THANKS!!!

A: 

I believe that since your custom tag libs are all generated programmatically in grails there's no automatic way to generate a tld. These docs (at the bottom) show how to call your tag libs from a JSP and the second step is to manually add your tag defs to the grails tld file.

Probably not what you wanted to hear.

Of course, the answer to the question of how to get auto-complete for custom taglibs in STS might yield more positive results, I don't know. I do know that Intellij Idea has this feature in the ultimate edition.

Dave