]
Max Rydahl Andersen commented on JBIDE-18036:
---------------------------------------------
@jpeterka any updates?
Decouple FTL target language syntax coloring
--------------------------------------------
Key: JBIDE-18036
URL:
https://issues.jboss.org/browse/JBIDE-18036
Project: Tools (JBoss Tools)
Issue Type: Task
Components: freemarker
Reporter: Peter Palaga
Assignee: Peter Palaga
Fix For: 4.2.1.Final
Attachments: coloring-issues.png
This issue covers the requirement formulated in point (1) of my earlier comment in
[
JBIDE-11287|https://issues.jboss.org/browse/JBIDE-11287?focusedCommentId=...].
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.