From 52c23ef4db798175210694cbbe8d14e0d548559f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wr=C3=B3tniak?= Date: Mon, 11 Jan 2016 19:56:19 +0100 Subject: [PATCH] Enable syntax highlighting for Swift Change-Id: I252789ad5414902641ba46a0afb3d3219202bc3a --- gerrit-gwtui/src/main/java/net/codemirror/mode/ModeInfo.java | 1 + gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java | 1 + .../com/google/gerrit/server/mime/mime-types.properties | 1 + lib/codemirror/cm.defs | 1 + 4 files changed, 4 insertions(+) diff --git a/gerrit-gwtui/src/main/java/net/codemirror/mode/ModeInfo.java b/gerrit-gwtui/src/main/java/net/codemirror/mode/ModeInfo.java index 85b350dc9d..fa4be77caa 100644 --- a/gerrit-gwtui/src/main/java/net/codemirror/mode/ModeInfo.java +++ b/gerrit-gwtui/src/main/java/net/codemirror/mode/ModeInfo.java @@ -73,6 +73,7 @@ public class ModeInfo extends JavaScriptObject { Modes.I.soy(), Modes.I.sql(), Modes.I.stex(), + Modes.I.swift(), Modes.I.velocity(), Modes.I.verilog(), Modes.I.vhdl(), diff --git a/gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java b/gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java index 42990b8407..4faaccf2bf 100644 --- a/gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java +++ b/gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java @@ -55,6 +55,7 @@ public interface Modes extends ClientBundle { @Source("scheme.js") @DoNotEmbed DataResource scheme(); @Source("shell.js") @DoNotEmbed DataResource shell(); @Source("smalltalk.js") @DoNotEmbed DataResource smalltalk(); + @Source("swift.js") @DoNotEmbed DataResource swift(); @Source("soy.js") @DoNotEmbed DataResource soy(); @Source("sql.js") @DoNotEmbed DataResource sql(); @Source("stex.js") @DoNotEmbed DataResource stex(); diff --git a/gerrit-server/src/main/resources/com/google/gerrit/server/mime/mime-types.properties b/gerrit-server/src/main/resources/com/google/gerrit/server/mime/mime-types.properties index 912e4b0bfc..e3fb157018 100644 --- a/gerrit-server/src/main/resources/com/google/gerrit/server/mime/mime-types.properties +++ b/gerrit-server/src/main/resources/com/google/gerrit/server/mime/mime-types.properties @@ -46,6 +46,7 @@ scala = text/x-scala soy = text/x-soy st = text/x-stsrc stex = text/x-stex +swift = text/x-swift v = text/x-verilog vert = x-shader/x-vertex vh = text/x-verilog diff --git a/lib/codemirror/cm.defs b/lib/codemirror/cm.defs index abb6d92081..967705889f 100644 --- a/lib/codemirror/cm.defs +++ b/lib/codemirror/cm.defs @@ -78,6 +78,7 @@ CM_MODES = [ 'soy', 'sql', 'stex', + 'swift', 'tcl', 'velocity', 'verilog',