[
https://issues.jboss.org/browse/JBIDE-11287?page=com.atlassian.jira.plugi...
]
Peter Palaga edited comment on JBIDE-11287 at 7/21/14 3:59 AM:
---------------------------------------------------------------
This issue is caused by the fact that we attempt to color not only FTL syntax, but also
XML. To put it more precisely, it is caused by the way how we highlight XML: We apply the
coloring on the whole {{<tagname attrib1="val1" attrib2="val2"
...>}} and we thus do not assume that colorable FTL constructs can appear inside (what
we detect as) XML constructs.
Let me propose some kind of strategy how to solve this (please comment):
(1) *Make XML/HTML syntax coloring optional:* 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. I propose
that we make the XML/HTML syntax coloring optional, by e.g. providing a workspace-wide
preference that will say for which file extensions will XML/HTML syntax coloring be
active. By default, it could be active for {{\*.xml.ftl}}, {{\*.xhtml.ftl}},
{{\*.html.ftl}} and {{\*.htm.ftl}}. Users will be able to adjust this to anything else
including {{\*.ftl}} or even {{\*.\*}}.
(2) *Fix XML/HTML syntax coloring*: we should not assume that XML constructs cannot
contain FTL constructs. To the contrary, all FTL constructs including directives and
user-defined macros and FTL comments must work inside XML constructs (i.e. XML elements
and XML comments).
Clearly, (2) is independent from (1) and (1) should get a separate issue (once we decide
to go that way) as it goes far beyond the scope of the present report.
was (Author: ppalaga):
This issue is caused by the fact that we attempt to color not only FTL syntax, but also
XML. To put it more precisely, it is caused by the way how we highlight XML: We apply the
coloring on the whole {{<tagname attrib1="val1" attrib2="val2"
...>}} and
Missing ref in outline view
---------------------------
Key: JBIDE-11287
URL:
https://issues.jboss.org/browse/JBIDE-11287
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: freemarker
Affects Versions: 3.3.0.Beta1
Environment: JBDS 5.0.0.Beta1 #105, L64
Reporter: Jiri Peterka
Assignee: Max Rydahl Andersen
Fix For: 4.2.0.CR1
Attachments: missing-ref-in-outline.png
See screenshot
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)