Tuesday, December 15, 2009

jboss tools 3.1M4 code assist/content assist not working with JSF core and html?

I was playing with jboss tools 3.1M4 and only found out that I am not getting content assist (CA) for the JSF core and html tags. All other namespaces work fine, like richfaces, seam, ajax4jsf etc. How could that be?

My first thought was that the TLDs for core and html are missing. So I manually added the core and html XSD into the XML catalog, restarted eclipse, didn't do it.

Next I found a couple wiki pages (here and here) talking about how content assist works in jboss tools 3.1. They are good how-to but not helping me out. I was ready to dive into the source code and examine the Knowledge Base CA processors.

Then something stroked my mind: is it because my project is not considered JSF projects? I right clicked my project and in the Jboss Tools menu selected "Add JSF Capabilities...", and voila, that made all the difference.

I spent about 3 hours trying to figure this out. This reminds me again: more often than not the solution is much simpler than one imagined.