How do I assign FreeMarker Template Data folders?
已回答
The Template Data Languages project setting screen is supposed to let me mark template languages used in various folders of the project. However despite being mentioned explictly in the description at the top of the settings I cannot seem to mark any of the folders with freemaker templates in them as such. Freemarker isn't an avilable option? I have the bundeld Freemarker plugin active, does this flagging the template folders not achive anything for freemarker?
请先登录再写评论。
Are your FreeMarker templates recognized as having FreeMarker language (e.g. are the directives there highlighted in a special way)? What do you observe, how do you tell that the settings are not applied?
My freemarker templates appear to be recognized. Syntax does get highlighted as they use a simple .ftl extension. Though I'm never quite sure how much support IDEA offers, lots of things don't resolve (highligthed red). I suspect this is partly because we have a strange project structure which doesn't have a simple webapps/webcontent folder. Our webapp is built from many folders from different folder levels, mapping web/spring resources causes me a lot of pain (eclipse project). Partly odd folder structure, partly lmits of freemarker support I suspect. I was trying different settings to see if I could improve things given I'm stuck with the folder structure.
It was more a question over what the template data folders settings screen allows. The description on the UI explictly mentions it can mark template languages like freemarker or velocity.. But neither of these appears in the dropdown choices in the UI? Just bad examples?
Thanks for the clarification. That settings screen allows to choose the template data languages for FreeMarker and Velocity, that is, what kind of template those frameworks generate. By default it's HTML but you can change it into any language that IDEA supports. As the result you'll get some code assistance for that language as well in FreeMarker/Velocity templates.
What was the last version of intellij that supported Freemaker as a template language
Hello John,
Freemarker is still supported. Freemarker is a template language, not a template data language. This setting controls which language should the IDE detect inside Freemarker files (e.g. *.ftl): https://www.jetbrains.com/help/idea/template-data-languages.html
There is a request to set template language for other extensions: https://youtrack.jetbrains.com/issue/IDEA-53520