Assistance with "Can't Resolve" inspection errors

Answered

Hello fellow IDEA users.  I would consider myself somewhat new to IDEA so please forgive me if this is a total NOOB question. I attempted to search the forums for an answer to this but I couldn't find anything that specifically applies to my case or perhaps I'm using the wrong terminology.

I'm using IDEA to develop ColdFusion applications (CFML) and I notice that on the code view I have lots of underlined variables with the warning message stating "Can't Resolve... This inspection checks that function references are resolved correctly".

Many of these warnings are on variables that are declared in my Application.cfc file, cfincludes, or they are REQUEST scoped variables.

I know that when editing a JavaScript document you can use JSDoc comments to define parameters (via @param).  Do I need to do something similar with ColdFusion files as well?  Or is there a way to point IDEA to my Application.cfc (and other included files) so it will figure out that these variables do indeed get defined elsewhere?

Thanks so much for taking the time to assist. :)

5 comments

Please attach a small sample project to illustrate this problem.

0

Thanks for the reply Serge.  I put together a little project to show you what I mean.

You can download it here:  https://www.dropbox.com/s/1qx7hu1t7kraetx/Temp%20Web%20Site%201.0.zip?dl=0

As you can see from the project file application.cfc (which gets called with every request) I set a few REQUEST scoped variables:

I also call the function getPreferences() which uses cfinclude to get some additional REQUEST scope variables::

Then if you look in cfc/test.cfc you will see that when I try and reference the variables I set in the REQUEST scope they can't be resolved.

Is there a way to make test.cfc aware of the REQUEST scope variables?

Thanks!

1

Anyone have any thoughts on how I can help IDEA understand the scope of my variables? It's been a few weeks but I'm still stuck on this.

0

I was just fixing the same issue, unchecking the "Inspections ->
CFML ->References inspection" checkbox

0

Thanks @Jeschke. I had to resort to that option as well but it definitely doesn't fix the issue.  I wish there was a way to let IDEA know where my global scoped (application, request, etc...) variables are or at the very least be able to define them in some type of configuration file.

0

Please sign in to leave a comment.