IntelliJ 9: Generics in Dynamic Properties in GSP's


Would it be possible to make dynamic properties in GSP support Generics? I have a <g:each> in my page, which looks like this:

<g:each in="${projects}" status="i" var="project">

However, IntelliJ doesn't know what 'projects' is (nor does it understand 'project'). I'd like to solve that by declaring 'projects' to be a List<Project>, but IntelliJ doesn't allow me. First, it doesn't understand 'Project'. If I press alt+enter at project, it replaces List<Project> by 'import nl.jworks.Project'. Secondly, if I type in List<nl.jworks.Project> manually, IntelliJ expects a ';'. So this doesn't work, but it would be nice if it did. Could you make this possible?

Thanks, Erik

Screen shot 2009-11-15 at 16.04.06.png
1 comment
Comment actions Permalink

Actually, adding a dynamic property for a property in the loop also doesn't work.

<g:link action="show" controller="project" id="${}" params="[title:project.title]">

I cannot say which type 'project' is. IntelliJ (JetGroovy) gives an error (which I've submitted). Might be a bug then?


Please sign in to leave a comment.