Codemirror: Add support for Groovy mode

Change-Id: I7654e4c9911a3c6da9023155440445a4e777516b
This commit is contained in:
David Ostrovsky
2014-01-15 22:16:17 +01:00
parent 893b5b13b7
commit 59da23e4ca
5 changed files with 7 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ public class ModeInjector {
Modes.I.commonlisp(), Modes.I.commonlisp(),
Modes.I.css(), Modes.I.css(),
Modes.I.go(), Modes.I.go(),
Modes.I.groovy(),
Modes.I.htmlmixed(), Modes.I.htmlmixed(),
Modes.I.javascript(), Modes.I.javascript(),
Modes.I.perl(), Modes.I.perl(),

View File

@@ -29,6 +29,7 @@ public interface Modes extends ClientBundle {
@Source("commonlisp/commonlisp.js") @DoNotEmbed DataResource commonlisp(); @Source("commonlisp/commonlisp.js") @DoNotEmbed DataResource commonlisp();
@Source("css/css.js") @DoNotEmbed DataResource css(); @Source("css/css.js") @DoNotEmbed DataResource css();
@Source("go/go.js") @DoNotEmbed DataResource go(); @Source("go/go.js") @DoNotEmbed DataResource go();
@Source("groovy/groovy.js") @DoNotEmbed DataResource groovy();
@Source("htmlmixed/htmlmixed.js") @DoNotEmbed DataResource htmlmixed(); @Source("htmlmixed/htmlmixed.js") @DoNotEmbed DataResource htmlmixed();
@Source("javascript/javascript.js") @DoNotEmbed DataResource javascript(); @Source("javascript/javascript.js") @DoNotEmbed DataResource javascript();
@Source("perl/perl.js") @DoNotEmbed DataResource perl(); @Source("perl/perl.js") @DoNotEmbed DataResource perl();

View File

@@ -21,6 +21,9 @@ text/x-scss
go: go:
text/x-go text/x-go
groovy:
text/x-groovy
htmlmixed: htmlmixed:
text/html text/html

View File

@@ -51,6 +51,7 @@ public class DefaultFileExtensionRegistry extends MimeDetector {
.put("lisp", LISP) .put("lisp", LISP)
.put("lsp", LISP) .put("lsp", LISP)
.put("clj", newMimeType("text/x-clojure", 2)) .put("clj", newMimeType("text/x-clojure", 2))
.put("groovy", newMimeType("text/x-groovy", 2))
.build(); .build();
private static MimeType newMimeType(String type, final int specificity) { private static MimeType newMimeType(String type, final int specificity) {

View File

@@ -19,6 +19,7 @@ CM3_MODES = [
'commonlisp/commonlisp.js', 'commonlisp/commonlisp.js',
'css/css.js', 'css/css.js',
'go/go.js', 'go/go.js',
'groovy/groovy.js',
'htmlmixed/htmlmixed.js', 'htmlmixed/htmlmixed.js',
'javascript/javascript.js', 'javascript/javascript.js',
'perl/perl.js', 'perl/perl.js',