From: Alan E. <ala...@gm...> - 2009-01-06 22:10:04
|
In general, please submit patches to the jedit-patches-tracker http://sourceforge.net/tracker/?group_id=588&atid=300588 The problem with mode file changes is that when it's for a mode that our devs have never used before, there is no way for them to effectively test it. Which is why some of these patches have not been reviewed or accepted. Also, if you are testing your mode file, please test it against the "dev" version of jedit, 4.3pre16, and ensure that there are no XML plugin parse errors when you open the mode file in jEdit, and say what version of jEdit you tested it with in the tracker description. On Sun, Jan 4, 2009 at 10:53 AM, Jonathan Revusky <re...@gm...> wrote: > Hi, I updated (finally) the freemarker.xml editing mode to handle the > new square bracket syntax. The first-line glob pattern should be changed to: > > [<\[]\#ftl* > > I would appreciate it if somebody would commit this so that it can be in > the next release. > > Thanks, > > Jonathan Revusky > -- > lead developer, FreeMarker project, http://freemarker.org/ > > ------------ > <?xml version="1.0"?> > > <!DOCTYPE MODE SYSTEM "xmode.dtd"> > > <!-- A JEdit mode configuration file for FTL (FreeMarker Template Language) > by Jonathan Revusky, re...@us... --> > > <MODE> > <RULES IGNORE_CASE="FALSE"> > > <!-- JavaScript --> > <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT"> > <BEGIN><script</BEGIN> > <END></script></END> > </SPAN> > <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT"> > <BEGIN><Script</BEGIN> > <END></Script></END> > </SPAN> > <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT"> > <BEGIN><SCRIPT</BEGIN> > <END></SCRIPT></END> > </SPAN> > > <!-- stylesheet --> > <SPAN TYPE="MARKUP" DELEGATE="html::CSS"> > <BEGIN><style</BEGIN> > <END></style></END> > </SPAN> > <SPAN TYPE="MARKUP" DELEGATE="html::CSS"> > <BEGIN><Style</BEGIN> > <END></Style></END> > </SPAN> > <SPAN TYPE="MARKUP" DELEGATE="html::CSS"> > <BEGIN><STYLE</BEGIN> > <END></STYLE></END> > </SPAN> > > <!-- XML/HTML comment --> > <SPAN TYPE="COMMENT2" DELEGATE="xml::DTD-TAGS"> > <BEGIN><!--</BEGIN> > <END>--></END> > </SPAN> > > <!-- DTD instructions --> > <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS"> > <BEGIN><!</BEGIN> > <END>></END> > </SPAN> > > <!-- FTL markup starts here. --> > > <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION"> > <BEGIN>${</BEGIN> > <END>}</END> > </SPAN> > > <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION"> > <BEGIN>#{</BEGIN> > <END>}</END> > </SPAN> > > <SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="<#ftl" > DELEGATE="EXPRESSION"> > <BEGIN><#ftl\b</BEGIN> > <END>></END> > </SPAN_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<"> > > <BEGIN><#(if|elseif|switch|foreach|list|case|assign|local|global|set|var|setting|include|embed|import|stop|escape|macro|function|transform|call|visit|recurse)(\s|/|$)</BEGIN> > <END>></END> > </SPAN_REGEXP> > > <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="</" > >;/#(assign|local|global|set|var|attempt|recover|if|switch|foreach|list|escape|macro|function|transform|compress|noescape|t_lines|nt_lines|rt_lines|lt_lines)></SEQ_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="<"> > > <BEGIN><#?(else|compress|noescape|default|break|flush|nested|t|rt|lt|t_lines|nt_lines|rt_lines|lt_lines|return|recurse)\b</BEGIN> > <END>></END> > </SPAN_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="</@"> > > <BEGIN></@(([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*)*?)?</BEGIN> > <END>></END> > </SPAN_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<@"> > > <BEGIN><@([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*?)*</BEGIN> > <END>></END> > </SPAN_REGEXP> > > <SPAN TYPE="COMMENT1"> > <BEGIN><#--</BEGIN> > <END>--></END> > </SPAN> > > <SEQ TYPE="KEYWORD1"><stop></SEQ> > <SPAN TYPE="COMMENT1"> > <BEGIN><comment></BEGIN> > <END></comment></END> > </SPAN> > <SPAN TYPE="INVALID"> > <BEGIN><#</BEGIN> > <END>></END> > </SPAN> > <SPAN TYPE="INVALID"> > <BEGIN></#</BEGIN> > <END>></END> > </SPAN> > > <!-- Newer syntax --> > > <SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="[#ftl" DELEGATE="EXPRESSION"> > <BEGIN>\[#ftl\b</BEGIN> > <END>]</END> > </SPAN_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="[#"> > > <BEGIN>\[#(if|elseif|switch|foreach|list|case|assign|local|global|set|var|setting|include|import|stop|escape|macro|function|transform|call|visit|recurse)(\s|/|$)</BEGIN> > <END>]</END> > </SPAN_REGEXP> > > <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="[/#" > >\[/#(assign|local|global|set|var|attempt|recover|if|switch|foreach|list|escape|macro|function|transform|compress|noescape|t_lines|rt_lines|nt_lines|lt_lines)]</SEQ_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="[#"> > > <BEGIN>\[#(else|compress|noescape|default|break|flush|nested|t|rt|lt|return|recurse|fallback|t_lines|lt_lines|rt_lines|nt_lines)\b</BEGIN> > <END>]</END> > </SPAN_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="[/@"> > > <BEGIN>\[/@(([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*)*?)?</BEGIN> > <END>]</END> > </SPAN_REGEXP> > > <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="[@"> > > <BEGIN>\[@([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*?)*</BEGIN> > <END>]</END> > </SPAN_REGEXP> > > <SPAN TYPE="COMMENT1"> > <BEGIN>[#--</BEGIN> > <END>--]</END> > </SPAN> > > <SPAN TYPE="COMMENT1"> > <BEGIN>[#comment]</BEGIN> > <END>[/#comment]</END> > </SPAN> > <SPAN TYPE="INVALID"> > <BEGIN>[#</BEGIN> > <END>]</END> > </SPAN> > <SPAN TYPE="INVALID"> > <BEGIN>[/#</BEGIN> > <END>]</END> > </SPAN> > > > <!-- non-FTL markup --> > <SPAN TYPE="MARKUP" DELEGATE="TAGS"> > <BEGIN><</BEGIN> > <END>></END> > </SPAN> > </RULES> > > <RULES SET="EXPRESSION" > DEFAULT="KEYWORD2" > HIGHLIGHT_DIGITS="TRUE" > IGNORE_CASE="FALSE" > > > <SPAN TYPE="COMMENT1"> > <BEGIN><#--</BEGIN> > <END>--></END> > </SPAN> > <SPAN TYPE="COMMENT1"> > <BEGIN><!--</BEGIN> > <END>--></END> > </SPAN> > > <SPAN TYPE="LITERAL1" ESCAPE="\"> > <BEGIN>"</BEGIN> > <END>"</END> > </SPAN> > <SPAN TYPE="OPERATOR" DELEGATE="EXPRESSION"> > <BEGIN>(</BEGIN><END>)</END> > </SPAN> > <SEQ TYPE="OPERATOR">=</SEQ> > <SEQ TYPE="OPERATOR">!</SEQ> > <SEQ TYPE="OPERATOR">|</SEQ> > <SEQ TYPE="OPERATOR">&</SEQ> > <SEQ TYPE="OPERATOR"><</SEQ> > <SEQ TYPE="OPERATOR">></SEQ> > <SEQ TYPE="OPERATOR">*</SEQ> > <SEQ TYPE="OPERATOR">/</SEQ> > <SEQ TYPE="OPERATOR">-</SEQ> > <SEQ TYPE="OPERATOR">+</SEQ> > <SEQ TYPE="OPERATOR">%</SEQ> > <SEQ TYPE="OPERATOR">.</SEQ> > <SEQ TYPE="OPERATOR">:</SEQ> > <SEQ TYPE="OPERATOR">.</SEQ> > <SEQ TYPE="OPERATOR">.</SEQ> > <SEQ TYPE="OPERATOR">[</SEQ> > <SEQ TYPE="OPERATOR">]</SEQ> > <SEQ TYPE="OPERATOR">{</SEQ> > <SEQ TYPE="OPERATOR">}</SEQ> > <SEQ TYPE="OPERATOR">;</SEQ> > <SEQ TYPE="OPERATOR">?</SEQ> > <!-- Builtins --> > <MARK_FOLLOWING TYPE="FUNCTION">?</MARK_FOLLOWING> > <KEYWORDS> > <KEYWORD1>true</KEYWORD1> > <KEYWORD1>false</KEYWORD1> > <KEYWORD1>null</KEYWORD1> > <KEYWORD1>as</KEYWORD1> > <KEYWORD1>in</KEYWORD1> > <KEYWORD1>using</KEYWORD1> > <OPERATOR>gt</OPERATOR> > <OPERATOR>gte</OPERATOR> > <OPERATOR>lt</OPERATOR> > <OPERATOR>lte</OPERATOR> > </KEYWORDS> > </RULES> > > <RULES SET="TAGS" DEFAULT="MARKUP"> > <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE"> > <BEGIN>"</BEGIN> > <END>"</END> > </SPAN> > > <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE"> > <BEGIN>'</BEGIN> > <END>'</END> > </SPAN> > > <SEQ TYPE="OPERATOR">=</SEQ> > </RULES> > > > <!-- a ruleset for when we are within a quoted string within an SGML tag > It can contain FTL interpolations --> > <RULES SET="INQUOTE" ESCAPE="\"> > <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION"> > <BEGIN>${</BEGIN> > <END>}</END> > </SPAN> > <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION"> > <BEGIN>#{</BEGIN> > <END>}</END> > </SPAN> > </RULES> > > <!-- empty ruleset to delegate to for spots where any non-whitespace > is invalid --> > <RULES SET="INVALID" DEFAULT="INVALID" /> > </MODE> > > > ------------------------------------------------------------------------------ > -- > ----------------------------------------------- > jEdit Developers' List > jEd...@li... > https://lists.sourceforge.net/lists/listinfo/jedit-devel > |