Resolving and completion has improved greatly over last month. There are still some issues, however things are good enough in general to discuss some higher-level desired functionality.
Definition of context variables in external metadata
As discussed in JIRA, sometimes you don't want to use the Jetbrains-specific @vtlvariable/@ftlvariable comment annotations (eg. in a multi-IDE team). In addition, some context variables can be present for all (or most) templates in a module, and adding the the same comment annotation over and over is a drag.
So, the most valuable new feature would be the possibility to declare context variables (similar to @vtlvariable/@ftlvariable) outside of the template file.
Provide two "scopes":
Add extra file tab (similar to web.xml editor). It allows quick navigation without digging into some detailed UI like facet or settings. This tab contains two tables, both having two columns (variable name and variable type). First table contains page-specific variables, the second table module-specific. Ctrl-B from template navigates to this tab.
Provide a second QuickFix ("Define implicit variable in config"?). This quickfix doesn't navigate to the second tab, but just shows a dialog/popup that accepts a type. Provide "module-wide" checkbox (unchecked by default) that determines in which scope/table the variable definition ends up. Accepting this dialog adds the definition, without ever switching to the second tab. This maintains editor flow. I can always Ctrl-B after accepting the dialog to change things, since editor caret will still be on variable reference (which is now resolved).
When invoking the fix, scan the current template for usages of the variable below caret. Collect (for now unresolved) property and method references, use these to perform a search in module classpath. Dialog suggests type candidates based on this search. Esc key clears suggestions and allows me to enter something myself (Ctrl-Shift-Space should be available). When there's only one match, I should be able to simply accept the dialog using Enter key and be done. :)
Can this data be stored in .iml file?
Predefined context variable groups
A possible extension to above support. Provide a way to define named sets of (name,type) tuples. In the context tab, allow a way to quickly add such set to either page or module scope.
For example FreemarkerServlet exposes not only JspTaglibs, but 4 other variables as well. Defining a group containing all 5 once, and then adding it to "module" scope for a given module quickly gets one started. I'd imagine such "group definitions" to be IDE-global.
Freemarker JSP taglib support
The JSP taglib support is often used when using Freemarker for HTML views. Things like Ctrl-Q and missing required attribute checking should be available. I'll file issues as I go.
Spring MVC makes it trivial to use Velocity or Freemarker. Better IDEA support would be very valuable here. Unsorted list of problems/features:
for Velocity, Spring implicitly includes "spring.vm" macros. No need to #include anything. How do I configure this for one or more templates?
for Freemarker, an <#import> is needed, however no full path needs to be specified. How do I configure this?
for the Spring messageXxx macros, provide resource bundle key resolving
for the Spring bindXxx macros, IDEA should know that these define a variable of type BindStatus.
That's it for now. Comments welcome. If needed, I'll provide a quick UI mockup sketch.