Permalink
Browse files

updating groovy and grails files so if people install g-mate after ge…

…dit-grails-bundle old versions don't overwrite new
  • Loading branch information...
1 parent 6135a71 commit 07e3159a1ca6374f651881d5b97ff5338fa11642 @aeischeid aeischeid committed with aaron Feb 25, 2011
Showing with 115 additions and 32 deletions.
  1. +52 −16 lang-specs/groovy.lang
  2. +58 −16 lang-specs/gsp.lang
  3. +5 −0 mime/groovy-mime.xml
  4. BIN tags/Grails.tags.gz
View
@@ -1,27 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
-<language id="groovy" _name="Groovy" version="2.0" _section="Sources">
+<language id="groovy" _name="Groovy Source File" version="2.0" _section="Sources">
<metadata>
- <property name="mimetypes">text/x-groovy</property>
- <property name="globs">*.groovy</property>
+ <property name="mimetypes">text/x-groovy;text/x-groovy++</property>
+ <property name="globs">*.groovy;*.gpp;*.g++</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
- <style id="comment" _name="Comment" map-to="def:comment"/>
- <style id="error" _name="Error" map-to="def:error"/>
- <style id="string" _name="String" map-to="def:string"/>
- <style id="external" _name="External" map-to="def:preprocessor"/>
- <style id="declaration" _name="Declaration" map-to="def:type"/>
- <style id="storage-class" _name="Storage Class" map-to="def:type"/>
- <style id="scope-declaration" _name="Scope Declaration" map-to="def:type"/>
- <style id="keyword" _name="Keyword" map-to="def:keyword"/>
- <style id="null-value" _name="Null Value" map-to="def:special-constant"/>
- <style id="boolean" _name="Boolean value" map-to="def:boolean"/>
- <style id="number" _name="Number" map-to="def:decimal"/>
- <style id="reserved" _name="Future Reserved Keywords" map-to="def:error"/>
- <style id="type" _name="Data Type" map-to="def:type"/>
+ <style id="comment" _name="Comment" map-to="def:comment"/>
+ <style id="error" _name="Error" map-to="def:error"/>
+ <style id="string" _name="String" map-to="def:string"/>
+ <style id="external" _name="External" map-to="def:preprocessor"/>
+ <style id="declaration" _name="Declaration" map-to="def:type"/>
+ <style id="storage-class" _name="Storage Class" map-to="def:type"/>
+ <style id="scope-declaration" _name="Scope Declaration" map-to="def:type"/>
+ <style id="keyword" _name="Keyword" map-to="def:keyword"/>
+ <style id="null-value" _name="Null Value" map-to="def:special-constant"/>
+ <style id="boolean" _name="Boolean value" map-to="def:boolean"/>
+ <style id="number" _name="Number" map-to="def:decimal"/>
+ <style id="reserved" _name="Future Reserved Keywords" map-to="def:error"/>
+ <style id="type" _name="Data Type" map-to="def:type"/>
+ <style id="variable" _name="Variable" map-to="def:identifier"/>
</styles>
<definitions>
@@ -35,6 +36,13 @@
<start>'</start>
<end>'</end>
</context>
+
+<!-- <context id="g-string" style-ref="string" end-at-line-end="true">-->
+<!-- <start>"${</start>-->
+<!-- <end>}"</end>-->
+<!-- </context>-->
+
+ <!-- TODO: add styling rule for annotations @page, @serializeable etc... -->
<context id="line-comment" style-ref="comment" end-at-line-end="true">
<start>//</start>
@@ -54,6 +62,10 @@
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
+
+ <context id="variable" style-ref="variable">
+ <match>\$[{,\[]+[a-zA-Z0-9_\.]*[},\]]+</match>
+ </context>
<context id="externals" style-ref="external">
<keyword>import</keyword>
@@ -83,6 +95,18 @@
<keyword>short</keyword>
<keyword>void</keyword>
</context>
+
+ <context id="simple-data-objects" style-ref="type">
+ <keyword>Boolean</keyword>
+ <keyword>Byte</keyword>
+ <keyword>Char</keyword>
+ <keyword>Date</keyword>
+ <keyword>Double</keyword>
+ <keyword>Float</keyword>
+ <keyword>Integer</keyword>
+ <keyword>Long</keyword>
+ <keyword>String</keyword>
+ </context>
<context id="storage-class" style-ref="storage-class">
<keyword>abstract</keyword>
@@ -105,17 +129,26 @@
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
+ <keyword>chain</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>each</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
+ <keyword>flash</keyword>
<keyword>for</keyword>
+ <keyword>forward</keyword>
<keyword>if</keyword>
+ <keyword>log</keyword>
+ <keyword>params</keyword>
+ <keyword>println</keyword>
+ <keyword>redirect</keyword>
<keyword>render</keyword>
+ <keyword>request</keyword>
<keyword>return</keyword>
<keyword>throw</keyword>
+ <keyword>session</keyword>
<keyword>switch</keyword>
<keyword>try</keyword>
<keyword>while</keyword>
@@ -155,12 +188,15 @@
<include>
<context ref="string"/>
<context ref="string-2"/>
+<!-- <context ref="g-string"/>-->
<context ref="line-comment"/>
<context ref="block-comment"/>
<context ref="close-comment-outside-comment"/>
+ <context ref="variable"/>
<context ref="externals"/>
<context ref="declarations"/>
<context ref="primitive-types"/>
+ <context ref="simple-data-objects"/>
<context ref="storage-class"/>
<context ref="scope-declarations"/>
<context ref="flow"/>
View
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<language id="gsp" _name="GSP" version="2.0" _section="Markup">
+<language id="gsp" _name="Groovy Server Page File" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/x-gsp</property>
<property name="globs">*.gsp</property>
@@ -8,12 +8,12 @@
</metadata>
<styles>
- <style id="comment" _name="Comment" map-to="xml:comment"/>
- <style id="tag" _name="Tag" map-to="xml:element-name"/>
- <style id="attrib-name" _name="Attribute Name" map-to="xml:attribute-name"/>
- <style id="attrib-value" _name="Attribute Value" map-to="xml:attribute-value"/>
- <style id="dtd" _name="DTD" map-to="xml:doctype"/>
- <style id="error" _name="Error" map-to="xml:error"/>
+ <style id="comment" _name="Comment" map-to="xml:comment"/>
+ <style id="tag" _name="Tag" map-to="xml:element-name"/>
+ <style id="attrib-name" _name="Attribute Name" map-to="xml:attribute-name"/>
+ <style id="attrib-value" _name="Attribute Value" map-to="xml:attribute-value"/>
+ <style id="dtd" _name="DTD" map-to="xml:doctype"/>
+ <style id="error" _name="Error" map-to="xml:error"/>
</styles>
<default-regex-options case-sensitive="false"/>
@@ -32,15 +32,55 @@
<start>&lt;!</start>
<end>&gt;</end>
</context>
+
+
+ <!--
+ <context id="g-string" style-ref="groovy:g-string">
+ <start>"${</start>
+ <end>}"</end>
+ </context>
+ -->
<!-- This is a placeholder context intended to be <replace>d
in languages like php that need to embedd contexts inside
html tags and attributes.
-->
+
<context id="embedded-lang-hook">
<start>\%{def:never-match}</start>
<end></end>
</context>
+
+ <!--
+ TODO: gsp embedded groovy syntax is " <% println 'hi I am groovy' %>"
+ -->
+<!-- <context id="groovy-block">-->
+<!-- <start>&lt;\%</start>-->
+<!-- <end>\%&gt;</end>-->
+<!-- <include>-->
+<!-- <context ref="groovy:string"/>-->
+<!-- <context ref="groovy:string-2"/>-->
+<!-- <context ref="groovy:g-string"/>-->
+<!-- <context ref="groovy:line-comment"/>-->
+<!-- <context ref="groovy:block-comment"/>-->
+<!-- <context ref="groovy:close-comment-outside-comment"/>-->
+<!-- <context ref="groovy:variable"/>-->
+<!-- <context ref="groovy:externals"/>-->
+<!-- <context ref="groovy:declarations"/>-->
+<!-- <context ref="groovy:primitive-types"/>-->
+<!-- <context ref="groovy:simple-data-objects"/>-->
+<!-- <context ref="groovy:storage-class"/>-->
+<!-- <context ref="groovy:scope-declarations"/>-->
+<!-- <context ref="groovy:flow"/>-->
+<!-- <context ref="groovy:memory"/>-->
+<!-- <context ref="groovy:future-reserved-words"/>-->
+<!-- <context ref="groovy:null-value"/>-->
+<!-- <context ref="groovy:boolean"/>-->
+<!-- <context ref="groovy:numeric"/>-->
+<!-- </include>-->
+<!-- </context>-->
+
+<!-- <replace id="html:embedded-lang-hook" ref="groovy-block"/>-->
<context id="generic-tag">
<include>
@@ -121,15 +161,15 @@
</include>
</context>
- <context id="gtag">
- <start>&lt;g:\s*/?\s*[a-z0-9_-]+</start>
- <end>/?\s*&gt;</end>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- <context ref="generic-tag"/>
- </include>
- </context>
+ <context id="gtag">
+ <start>&lt;g:\s*/?\s*[a-z0-9_-]+</start>
+ <end>/?\s*&gt;</end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ </include>
+ </context>
<context id="gsp">
<include>
@@ -139,6 +179,8 @@
<context ref="xml:cdata"/>
<context ref="comment"/>
<context ref="dtd"/>
+<!-- <context ref="g-string"/>-->
+<!-- <context ref="groovy-block"/>-->
<context ref="script"/>
<context ref="tag"/>
<context ref="gtag"/>
View
@@ -5,4 +5,9 @@
<comment>Groovy Source File</comment>
<glob pattern="*.groovy"/>
</mime-type>
+ <mime-type type="text/x-groovy++">
+ <sub-class-of type="text/x-groovy"/>
+ <comment>Groovy++ Source File</comment>
+ <glob pattern="*.gpp;*.g++"/>
+ </mime-type>
</mime-info>
View
Binary file not shown.

0 comments on commit 07e3159

Please sign in to comment.