java - Code assistance in IntelliJ IDEA for implicit variables in Twirl Template -


i building web app in java using play! framework , twirl template engine, using intellij idea. in template there number of implicit variables available(flash, session, requestheader). can reference of these variables , app compile , run expected. however, these variables have not been explicitly declared, idea shows error(eg. cannot resolve symbol flash) , not provide code assistance. while not huge problem fix if possible.

i have searched quite bit solution, , jetbrains blog has post on how velocity templates, if me same twirl templates thankful!

jackson

i have found solution problem, refer qualified name within code, ie. access flash variable use

@play.mvc.http.context.implicit.flash 

this can imported @ top of template, can refer @flash in code.

this should not necessary- play! aware of these variables without explicitly importing them, idea's sake. strangely enough, found after creating new project through idea did provide expected behaviour- use @flash without import , idea work expected. once closed , reopened project same problem occur.

at moment best solution have found, although have contacted intellij support , if offer better solution update answer accordingly.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -