Is "Cannot determine type statically" In GSP Ever Meaningful?

Hi,

I find the enormous number of "Cannot determine type statically" in GSP pages can make it very hard to edit. In many places in GSP files, there are so many ${...} references, all of which show this diagnostic, that they interfere with editing.

Cannot this very dubious diagnostic be disabled in GSP files? At least, can the tooltip be disabled or be somehow put under user control, rather than showing up unconditionally?


Randall Schulz

4 comments

Hmm, this info highlighting has actually a fix to import a class attached to it, so lack of this would result in no auto import. Why do you think it gets in your way?

0

I don't understand. What's being auto-imported by what? I'm talking about a GSP file, not a Groovy file. It occurs on every $ in a GSP file. They'll never resolve statically, so what's the point?

And it gets in the way because it is quite literally in the way. The tool-tip obscures the code I'm trying to select with the mouse. It's very frustrating.


Randall Schulz

0

Let me explain.
in gsp you can have groovy code, including GSP "EL". Now in case you type "AClass.f()" where AClass is not yet imported, you would probably expect auto import intention on "AClass". This is indeed the case, but it is bound to dynamic reference highlighting you are talking about.

0

Well surely it could be made more selective?

For one thing, putting Groovy code is GSP is discouraged anyway (and far less necessary than in JSP), so I don't think it's the use case that should dominate the far more common cases where it's irrelevant, obfuscatory and intrusive.

Randall Schulz

0

Please sign in to leave a comment.