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

Decouple FTL target language syntax coloring

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.Beta1
    • None
    • freemarker
    • None

      This issue covers the requirement formulated in point (1) of my earlier comment in JBIDE-11287.

      The present Freemarker plugin has a hard-coded XML/HTML syntax coloring. Although XML/HTML may well be the most common target language of an FTL template, it is clearly not the only possible target language. One can target virtually any language or even plaintext, where < and <!-- may have completely different meanings or no meanigs at all. Hardcoding XML highlighting for every file opened by the FTL editor is thus simply incorrect.

      Let's define the present task as follows:

      (1) Decouple the syntax coloring of the target language of a FTL template by introducing an interface (call it TargetLanguageSupport) that will provide the general functionality needed for coloring of target languages.

      (2) At least two implementations of TargetLanguageSupport should be added:
      (2.1) XML/HTML and
      (2.2) plain text.

      (3) Some kind of target-language detection should be added, e.g. based on file extensions, making XML/HTML syntax coloring active for files ending with *.xml.ftl, *.xhtml.ftl, *.html.ftl and *.htm.ftl.
      (3.1) There should be a workspace-wide preference that will say for which file extensions will e.g. XML/HTML syntax coloring be active.

            nivologd@gmail.com Denis Golovin (Inactive)
            ppalaga Peter Palaga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: