Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache Freemarker-Template Language Support #2698

Open
ChrNi-CleverProcess opened this issue Dec 13, 2023 · 0 comments
Open

Apache Freemarker-Template Language Support #2698

ChrNi-CleverProcess opened this issue Dec 13, 2023 · 0 comments

Comments

@ChrNi-CleverProcess
Copy link

ChrNi-CleverProcess commented Dec 13, 2023

Have you checked the issues and discussions to ensure there are no duplicates?

Yes

Your programming languages

Java

Free or paid?

Paid users

Expected Behavior

I have to work with the famous Apache Freemarker template engine now.
Freemarker Template Language (.ftl) seems not to be supported right now by Rainbow brackets.
https://freemarker.apache.org/docs/ref_directives.html

The directives there are similar like HTML but with a hash char: <#if>…</#if>
But there are directives, which don't need closing tags... like <#ftl...>, <#import ...>, <#assign ...>

Code snippet for test

<#if x == 1>
  x is 1
</#if>
<#if x == 1>
  x is 1
<#else>
  x is not 1
</#if>
<#if x == 1>
  x is 1
<#elseif x == 2>
  x is 2
<#elseif x == 3>
  x is 3
<#elseif x == 4>
  x is 4
<#else>
  x is not 1 nor 2 nor 3 nor 4
</#if>

not allowed: <#if>…<#else>...<#else>...</#if>

<#import "/libs/commons.ftl" as com>
<#ftl encoding="UTF-8">

i.e. assign

<#assign seq = ["foo", "bar", "baz"]>
<#macro myMacro>foo</#macro>
<#assign x>
  <#list 1..3 as n>
    ${n} <@myMacro />
  </#list>
</#assign>
Number of words: ${x?word_list?size}
${x}

Your Environment

IntelliJ IDEA 2023.3.1 (Ultimate Edition)
Build #IU-233.11799.300, built on December 12, 2023
Licensed to C***N***e
Subscription is active until May 1, 2024.
Runtime version: 17.0.9+7-b1087.7 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 12
Registry:
ide.balloon.shadow.size=0
debugger.watches.in.variables=false
ide.experimental.ui=true
Non-Bundled Plugins:
lermitage.intellij.extratci (1.29.0)
com.jetbrains.edu (2023.11-2023.3-421)
com.github.copilot (1.4.4.3955)
com.intellij.properties.bundle.editor (233.11799.172)
Key Promoter X (2023.3.0)
co.bito.bito-intellij (1.2.6)
com.chylex.intellij.coloredicons (1.5)
org.intellij.RegexpTester (2.2.0)
org.igu.plugins.bettercomments (1.0)
com.jetbrains.jax.ws (233.11799.196)
org.strangeway.vaadin (233.11799.196)
com.intellij.spring.shell (233.11799.196)
com.intellij.spring.websocket (233.11799.196)
com.intellij.lang.jsgraphql (233.11799.172)
com.intellij.javaee.ejb (233.11799.196)
com.jetbrains.packagesearch.intellij-plugin (233.11799.196)
com.linsage (1.0.7)
MavenRunHelper (4.27.1-IJ2022.2)
izhangzhihao.rainbow.brackets (2023.3.9-233)
com.haulmont.jpab (2023.4.1-233)
ru.adelf.idea.dotenv (2023.3)
com.intellij.ml.llm (233.11799.300)
com.crunch42.openapi (1.69)
com.mallowigi (94.1.0)
cn.yiiguxing.plugin.translate (3.5.6)
com.intellij.spring.graphql (233.11799.196)
Kotlin: 233.11799.300-IJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant