Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-21819

Freemarker syntax highlighting issues with square brackets syntax

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.4.1.AM2
    • 4.3.0.Final
    • freemarker
    • None

    Description

      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

      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)

      *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*[@alerts.success placeholder="${defaultPlaceholder}" class="fade alert-fixed"]${uitags.assignmentRemoved}*4*[/@alerts.success]
      
      

      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}

      Attachments

        Issue Links

          Activity

            People

              alexeykazakov Alexey Kazakov
              kurkha Kari Aliranta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: