I mentioned this on a previous ticket, but I think it deserves its own.
Application.cfm/cfc is similar to a servlet filter, where the code runs before the page is executed. The application.cfm/cfc in the first parent directory is the one used.
On application.cfm all code is executed before request start, on the application.cfc only the onRequestStart method is executed.
So for example if you had a directory structure like so
/application.cfm
/myfolder/application.cfm
/myfolder/subfolder/MyPage.cfm
/anotherfolder/AnotherPage.cfm
MyPage.cfm would run myfolder/application.cfm before execution. /application.cfm would not be run
However AnotherPage.cfm would run /application.cfm because it doesn't have an application.cfm inside /anotherfolder/
It is common practice in Application.cfm/cfc to define or include functions and variables so you would want them available to you.
It is very common to use a <cfinclude template="/functions/MyFunctionsLib.cfm"> on the Application.cfm to import a file of <cffunction> tags
Since it is common to declare variables it would be fantastic if I could use the @cfmlvariable annotation on my application to make request wide variables automatically type aware throughout pages that use the application.cfm/cfc.
Let me know if I can provide any more detail or explanation. Here is a document from Adobe with an overview of the structure of Application.cfm/cfc
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001111.htm
Since IDEA is decoupled from the CF runtime, what about (for now) specifying this configuration information at the project level instead of in the code? Maybe something in the ColdFusion facet that allows you to specify variable name literals or patterns and patterns for matching directories and files? Example:
Project Settings > Facets > ColdFusion > MyColdFusion Facet ... Then somewhere in there, you could specify something like:
Variable References Table:
Where "loader" is a literal name to be matched exactly anywhere in the project structure. And "javaVar*" is a pattern that would match any valid variable name that begins the string javaVar AND that exists anywhere in the /admin/ subdirectory AND matches any cfc files. At least this way, we might be able to have content assist for 3rd party classes but only have to specify it in one place. However, maybe while coding, we wouldn't want to stop to configure the project, so using the <!---@cfmlvariable ... ---> would override what's defined at the project level.
just an idea ...