[
https://issues.jboss.org/browse/JBIDE-21819?page=com.atlassian.jira.plugi...
]
Daniel Dekany commented on JBIDE-21819:
---------------------------------------
The overhauled scanners of JBIDE-20180 (PR sent) happens to solve these. It's not to
say that it makes square bracket syntax handling perfect (for example, if the syntax
changes after you have opened the file, it won't re-scan the document automatically),
but it solves the specific problems describe here.
Freemarker syntax highlighting issues with square brackets syntax
-----------------------------------------------------------------
Key: JBIDE-21819
URL:
https://issues.jboss.org/browse/JBIDE-21819
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: freemarker
Affects Versions: 4.3.0.Final
Reporter: Kari Aliranta
Fix For: LATER
Ftl file (square syntax) highlighting seems to have two issues in the latest final,
i.e.:
1. It needs user input to engage (except for interpolation tags, i.e. ${somevariable})
2. It is stopped by ${somevariable} tags that are NOT within brackets
h2. Example
This is best exemplified by following beginning of an actual ftl file:
(*1*, *2* etc. with stars are my markings for referencing, and are NOT in actual FTL
file)
{code}
*1*[#ftl attributes={"layout":"defaultLayout"} /]
[#if cmpsContainer??]
[#if cmpsContainer.getComponent('protocols')??]
[#assign protocols = cmpsContainer.getComponent('protocols') /]
[/#if]
[/#if]
*2*
<script>head.load("${root}/lib/redbox.js");</script>
*3*[(a)alerts.success placeholder="${defaultPlaceholder}" class="fade
alert-fixed"]${uitags.assignmentRemoved}*4*[/(a)alerts.success]
{code}
The following happens:
- When opening the file, the only things highlighted are the ${root} and
${uitags.assignmentRemoved} (considered "interpolation" in Freemarker syntax
highlighting configuration)
- You need to write anything at *1* to engage highlighting other syntax, in which case
the highlighting runs up until *2*
- You then need to write anything at *3* to continue highlighting, in which case the
hightlighting stops at *4*, and you then need to write anything at *4* to make it
continue
- Note that the highlighting does NOT stop at ${defaultPlaceholder}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)