Permalink
Browse files

Added completions for services

  • Loading branch information...
1 parent b68a9df commit bed69e68b9c5d4d3f237276fdd6a19be81fea4c0 @gcrick gcrick committed Oct 2, 2012
Showing with 41 additions and 1 deletion.
  1. +8 −1 GrailsSyntax.py
  2. +8 −0 Service/GrailsService.sublime-completions
  3. +25 −0 Service/GrailsService.tmLanguage
View
@@ -38,6 +38,8 @@ def check_syntax(self, view):
self.set_syntax('GrailsDomain', 'Grails/Domain')
elif self.is_controller():
self.set_syntax('GrailsController', 'Grails/Controller')
+ elif self.is_service():
+ self.set_syntax('GrailsService', 'Grails/Service')
else:
self.set_syntax('Groovy', 'Groovy')
@@ -49,7 +51,12 @@ def is_domain(self):
def is_controller(self):
- if 'grails-app/controller' in self.path:
+ if 'grails-app/controllers' in self.path:
+ return True
+ return False
+
+ def is_service(self):
+ if 'grails-app/services' in self.path:
return True
return False
@@ -0,0 +1,8 @@
+{
+ "scope": "source.groovy.grails.service",
+ "completions": [
+ {
+ "trigger": "static transactional = true"
+ }
+ ]
+}
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>fileTypes</key>
+ <array>
+ <string>groovy</string>
+ </array>
+ <key>keyEquivalent</key>
+ <string>^~G</string>
+ <key>name</key>
+ <string>Grails Service (Groovy)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.groovy</string>
+ </dict>
+ </array>
+ <key>scopeName</key>
+ <string>source.groovy.grails.service</string>
+ <key>uuid</key>
+ <string>72bcf961-0920-44c5-8ec7-4a0afd1309fc</string>
+</dict>
+</plist>

0 comments on commit bed69e6

Please sign in to comment.