aced_rails 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +3 -0
  3. data/CHANGELOG.md +9 -0
  4. data/README.md +29 -31
  5. data/aced_rails.gemspec +2 -2
  6. data/lib/aced_rails/config.rb +18 -18
  7. data/lib/aced_rails/helpers.rb +2 -3
  8. data/lib/aced_rails/version.rb +1 -1
  9. data/lib/generators/aced_rails/templates/aced_rails.rb +24 -16
  10. data/vendor/assets/javascripts/ace/ace.js +2 -1
  11. data/vendor/assets/javascripts/ace/ext-searchbox.js +1 -0
  12. data/vendor/assets/javascripts/ace/ext-spellcheck.js +1 -0
  13. data/vendor/assets/javascripts/ace/ext-static_highlight.js +1 -0
  14. data/vendor/assets/javascripts/ace/ext-textarea.js +1 -0
  15. data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -1
  16. data/vendor/assets/javascripts/ace/keybinding-vim.js +1 -1
  17. data/vendor/assets/javascripts/ace/mode-abap.js +1 -0
  18. data/vendor/assets/javascripts/ace/mode-asciidoc.js +1 -0
  19. data/vendor/assets/javascripts/ace/mode-c9search.js +1 -0
  20. data/vendor/assets/javascripts/ace/mode-c_cpp.js +1 -1
  21. data/vendor/assets/javascripts/ace/mode-clojure.js +1 -1
  22. data/vendor/assets/javascripts/ace/mode-coffee.js +1 -1
  23. data/vendor/assets/javascripts/ace/mode-coldfusion.js +1 -1
  24. data/vendor/assets/javascripts/ace/mode-csharp.js +1 -1
  25. data/vendor/assets/javascripts/ace/mode-css.js +1 -1
  26. data/vendor/assets/javascripts/ace/mode-curly.js +1 -0
  27. data/vendor/assets/javascripts/ace/mode-dart.js +1 -0
  28. data/vendor/assets/javascripts/ace/mode-diff.js +1 -0
  29. data/vendor/assets/javascripts/ace/mode-django.js +1 -0
  30. data/vendor/assets/javascripts/ace/mode-dot.js +1 -0
  31. data/vendor/assets/javascripts/ace/mode-glsl.js +1 -0
  32. data/vendor/assets/javascripts/ace/mode-golang.js +1 -0
  33. data/vendor/assets/javascripts/ace/mode-groovy.js +1 -1
  34. data/vendor/assets/javascripts/ace/mode-haml.js +1 -0
  35. data/vendor/assets/javascripts/ace/mode-haxe.js +1 -1
  36. data/vendor/assets/javascripts/ace/mode-html.js +1 -1
  37. data/vendor/assets/javascripts/ace/mode-jade.js +1 -0
  38. data/vendor/assets/javascripts/ace/mode-java.js +1 -1
  39. data/vendor/assets/javascripts/ace/mode-javascript.js +1 -1
  40. data/vendor/assets/javascripts/ace/mode-json.js +1 -1
  41. data/vendor/assets/javascripts/ace/mode-jsp.js +1 -0
  42. data/vendor/assets/javascripts/ace/mode-jsx.js +1 -0
  43. data/vendor/assets/javascripts/ace/mode-latex.js +1 -1
  44. data/vendor/assets/javascripts/ace/mode-less.js +1 -0
  45. data/vendor/assets/javascripts/ace/mode-liquid.js +1 -0
  46. data/vendor/assets/javascripts/ace/mode-lisp.js +1 -0
  47. data/vendor/assets/javascripts/ace/mode-livescript.js +1 -0
  48. data/vendor/assets/javascripts/ace/mode-lua.js +1 -1
  49. data/vendor/assets/javascripts/ace/mode-luapage.js +1 -0
  50. data/vendor/assets/javascripts/ace/mode-lucene.js +1 -0
  51. data/vendor/assets/javascripts/ace/mode-makefile.js +1 -0
  52. data/vendor/assets/javascripts/ace/mode-markdown.js +1 -1
  53. data/vendor/assets/javascripts/ace/mode-objectivec.js +1 -0
  54. data/vendor/assets/javascripts/ace/mode-ocaml.js +1 -1
  55. data/vendor/assets/javascripts/ace/mode-perl.js +1 -1
  56. data/vendor/assets/javascripts/ace/mode-pgsql.js +1 -1
  57. data/vendor/assets/javascripts/ace/mode-php.js +1 -1
  58. data/vendor/assets/javascripts/ace/mode-powershell.js +1 -1
  59. data/vendor/assets/javascripts/ace/mode-python.js +1 -1
  60. data/vendor/assets/javascripts/ace/mode-r.js +1 -0
  61. data/vendor/assets/javascripts/ace/mode-rdoc.js +1 -0
  62. data/vendor/assets/javascripts/ace/mode-rhtml.js +1 -0
  63. data/vendor/assets/javascripts/ace/mode-ruby.js +1 -1
  64. data/vendor/assets/javascripts/ace/mode-scad.js +1 -1
  65. data/vendor/assets/javascripts/ace/mode-scala.js +1 -1
  66. data/vendor/assets/javascripts/ace/mode-scheme.js +1 -0
  67. data/vendor/assets/javascripts/ace/mode-scss.js +1 -1
  68. data/vendor/assets/javascripts/ace/mode-sh.js +1 -1
  69. data/vendor/assets/javascripts/ace/mode-sql.js +1 -1
  70. data/vendor/assets/javascripts/ace/mode-stylus.js +1 -0
  71. data/vendor/assets/javascripts/ace/mode-svg.js +1 -1
  72. data/vendor/assets/javascripts/ace/mode-tcl.js +1 -0
  73. data/vendor/assets/javascripts/ace/mode-tex.js +1 -0
  74. data/vendor/assets/javascripts/ace/mode-textile.js +1 -1
  75. data/vendor/assets/javascripts/ace/mode-tm_snippet.js +1 -0
  76. data/vendor/assets/javascripts/ace/mode-typescript.js +1 -0
  77. data/vendor/assets/javascripts/ace/mode-vbscript.js +1 -0
  78. data/vendor/assets/javascripts/ace/mode-xml.js +1 -1
  79. data/vendor/assets/javascripts/ace/mode-xquery.js +1 -1
  80. data/vendor/assets/javascripts/ace/mode-yaml.js +1 -0
  81. data/vendor/assets/javascripts/ace/theme-ambiance.js +1 -0
  82. data/vendor/assets/javascripts/ace/theme-chaos.js +1 -0
  83. data/vendor/assets/javascripts/ace/theme-chrome.js +1 -1
  84. data/vendor/assets/javascripts/ace/theme-clouds.js +1 -1
  85. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +1 -1
  86. data/vendor/assets/javascripts/ace/theme-cobalt.js +1 -1
  87. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +1 -1
  88. data/vendor/assets/javascripts/ace/theme-dawn.js +1 -1
  89. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +1 -1
  90. data/vendor/assets/javascripts/ace/theme-eclipse.js +1 -1
  91. data/vendor/assets/javascripts/ace/theme-github.js +1 -0
  92. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +1 -1
  93. data/vendor/assets/javascripts/ace/theme-kr.js +1 -0
  94. data/vendor/assets/javascripts/ace/theme-merbivore.js +1 -1
  95. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +1 -1
  96. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +1 -1
  97. data/vendor/assets/javascripts/ace/theme-monokai.js +1 -1
  98. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +1 -1
  99. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +1 -1
  100. data/vendor/assets/javascripts/ace/theme-solarized_light.js +1 -1
  101. data/vendor/assets/javascripts/ace/theme-textmate.js +1 -0
  102. data/vendor/assets/javascripts/ace/theme-tomorrow.js +1 -1
  103. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +1 -1
  104. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +1 -1
  105. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +1 -1
  106. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +1 -1
  107. data/vendor/assets/javascripts/ace/theme-twilight.js +1 -1
  108. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +1 -1
  109. data/vendor/assets/javascripts/ace/theme-xcode.js +1 -0
  110. data/vendor/assets/javascripts/ace/worker-coffee.js +1 -7456
  111. data/vendor/assets/javascripts/ace/worker-css.js +1 -11693
  112. data/vendor/assets/javascripts/ace/worker-javascript.js +1 -10305
  113. data/vendor/assets/javascripts/ace/worker-json.js +1 -3062
  114. data/vendor/assets/javascripts/ace/worker-php.js +1 -0
  115. data/vendor/assets/javascripts/ace/worker-xquery.js +1 -0
  116. data/vendor/assets/javascripts/aced-rails.js.coffee +58 -0
  117. metadata +60 -205
  118. data/vendor/assets/javascripts/ace/ace-compat-noconflict.js +0 -1
  119. data/vendor/assets/javascripts/ace/ace-compat-uncompressed-noconflict.js +0 -480
  120. data/vendor/assets/javascripts/ace/ace-compat-uncompressed.js +0 -480
  121. data/vendor/assets/javascripts/ace/ace-compat.js +0 -1
  122. data/vendor/assets/javascripts/ace/ace-noconflict.js +0 -10
  123. data/vendor/assets/javascripts/ace/ace-uncompressed-noconflict.js +0 -15241
  124. data/vendor/assets/javascripts/ace/ace-uncompressed.js +0 -15241
  125. data/vendor/assets/javascripts/ace/keybinding-emacs-noconflict.js +0 -1
  126. data/vendor/assets/javascripts/ace/keybinding-emacs-uncompressed-noconflict.js +0 -150
  127. data/vendor/assets/javascripts/ace/keybinding-emacs-uncompressed.js +0 -150
  128. data/vendor/assets/javascripts/ace/keybinding-vim-noconflict.js +0 -1
  129. data/vendor/assets/javascripts/ace/keybinding-vim-uncompressed-noconflict.js +0 -138
  130. data/vendor/assets/javascripts/ace/keybinding-vim-uncompressed.js +0 -138
  131. data/vendor/assets/javascripts/ace/mode-c_cpp-noconflict.js +0 -1
  132. data/vendor/assets/javascripts/ace/mode-c_cpp-uncompressed-noconflict.js +0 -918
  133. data/vendor/assets/javascripts/ace/mode-c_cpp-uncompressed.js +0 -918
  134. data/vendor/assets/javascripts/ace/mode-clojure-noconflict.js +0 -1
  135. data/vendor/assets/javascripts/ace/mode-clojure-uncompressed-noconflict.js +0 -422
  136. data/vendor/assets/javascripts/ace/mode-clojure-uncompressed.js +0 -422
  137. data/vendor/assets/javascripts/ace/mode-coffee-noconflict.js +0 -1
  138. data/vendor/assets/javascripts/ace/mode-coffee-uncompressed-noconflict.js +0 -605
  139. data/vendor/assets/javascripts/ace/mode-coffee-uncompressed.js +0 -605
  140. data/vendor/assets/javascripts/ace/mode-coldfusion-noconflict.js +0 -1
  141. data/vendor/assets/javascripts/ace/mode-coldfusion-uncompressed-noconflict.js +0 -2391
  142. data/vendor/assets/javascripts/ace/mode-coldfusion-uncompressed.js +0 -2391
  143. data/vendor/assets/javascripts/ace/mode-csharp-noconflict.js +0 -1
  144. data/vendor/assets/javascripts/ace/mode-csharp-uncompressed-noconflict.js +0 -768
  145. data/vendor/assets/javascripts/ace/mode-csharp-uncompressed.js +0 -768
  146. data/vendor/assets/javascripts/ace/mode-css-noconflict.js +0 -1
  147. data/vendor/assets/javascripts/ace/mode-css-uncompressed-noconflict.js +0 -676
  148. data/vendor/assets/javascripts/ace/mode-css-uncompressed.js +0 -676
  149. data/vendor/assets/javascripts/ace/mode-groovy-noconflict.js +0 -1
  150. data/vendor/assets/javascripts/ace/mode-groovy-uncompressed-noconflict.js +0 -1298
  151. data/vendor/assets/javascripts/ace/mode-groovy-uncompressed.js +0 -1298
  152. data/vendor/assets/javascripts/ace/mode-haxe-noconflict.js +0 -1
  153. data/vendor/assets/javascripts/ace/mode-haxe-uncompressed-noconflict.js +0 -768
  154. data/vendor/assets/javascripts/ace/mode-haxe-uncompressed.js +0 -768
  155. data/vendor/assets/javascripts/ace/mode-html-noconflict.js +0 -1
  156. data/vendor/assets/javascripts/ace/mode-html-uncompressed-noconflict.js +0 -2407
  157. data/vendor/assets/javascripts/ace/mode-html-uncompressed.js +0 -2407
  158. data/vendor/assets/javascripts/ace/mode-java-noconflict.js +0 -1
  159. data/vendor/assets/javascripts/ace/mode-java-uncompressed-noconflict.js +0 -1300
  160. data/vendor/assets/javascripts/ace/mode-java-uncompressed.js +0 -1300
  161. data/vendor/assets/javascripts/ace/mode-javascript-noconflict.js +0 -1
  162. data/vendor/assets/javascripts/ace/mode-javascript-uncompressed-noconflict.js +0 -1131
  163. data/vendor/assets/javascripts/ace/mode-javascript-uncompressed.js +0 -1131
  164. data/vendor/assets/javascripts/ace/mode-json-noconflict.js +0 -1
  165. data/vendor/assets/javascripts/ace/mode-json-uncompressed-noconflict.js +0 -696
  166. data/vendor/assets/javascripts/ace/mode-json-uncompressed.js +0 -696
  167. data/vendor/assets/javascripts/ace/mode-latex-noconflict.js +0 -1
  168. data/vendor/assets/javascripts/ace/mode-latex-uncompressed-noconflict.js +0 -95
  169. data/vendor/assets/javascripts/ace/mode-latex-uncompressed.js +0 -95
  170. data/vendor/assets/javascripts/ace/mode-lua-noconflict.js +0 -1
  171. data/vendor/assets/javascripts/ace/mode-lua-uncompressed-noconflict.js +0 -523
  172. data/vendor/assets/javascripts/ace/mode-lua-uncompressed.js +0 -523
  173. data/vendor/assets/javascripts/ace/mode-markdown-noconflict.js +0 -1
  174. data/vendor/assets/javascripts/ace/mode-markdown-uncompressed-noconflict.js +0 -2849
  175. data/vendor/assets/javascripts/ace/mode-markdown-uncompressed.js +0 -2849
  176. data/vendor/assets/javascripts/ace/mode-ocaml-noconflict.js +0 -1
  177. data/vendor/assets/javascripts/ace/mode-ocaml-uncompressed-noconflict.js +0 -539
  178. data/vendor/assets/javascripts/ace/mode-ocaml-uncompressed.js +0 -539
  179. data/vendor/assets/javascripts/ace/mode-perl-noconflict.js +0 -1
  180. data/vendor/assets/javascripts/ace/mode-perl-uncompressed-noconflict.js +0 -573
  181. data/vendor/assets/javascripts/ace/mode-perl-uncompressed.js +0 -573
  182. data/vendor/assets/javascripts/ace/mode-pgsql-noconflict.js +0 -1
  183. data/vendor/assets/javascripts/ace/mode-pgsql-uncompressed-noconflict.js +0 -1107
  184. data/vendor/assets/javascripts/ace/mode-pgsql-uncompressed.js +0 -1107
  185. data/vendor/assets/javascripts/ace/mode-php-noconflict.js +0 -1
  186. data/vendor/assets/javascripts/ace/mode-php-uncompressed-noconflict.js +0 -1884
  187. data/vendor/assets/javascripts/ace/mode-php-uncompressed.js +0 -1884
  188. data/vendor/assets/javascripts/ace/mode-powershell-noconflict.js +0 -1
  189. data/vendor/assets/javascripts/ace/mode-powershell-uncompressed-noconflict.js +0 -706
  190. data/vendor/assets/javascripts/ace/mode-powershell-uncompressed.js +0 -706
  191. data/vendor/assets/javascripts/ace/mode-python-noconflict.js +0 -1
  192. data/vendor/assets/javascripts/ace/mode-python-uncompressed-noconflict.js +0 -506
  193. data/vendor/assets/javascripts/ace/mode-python-uncompressed.js +0 -506
  194. data/vendor/assets/javascripts/ace/mode-ruby-noconflict.js +0 -1
  195. data/vendor/assets/javascripts/ace/mode-ruby-uncompressed-noconflict.js +0 -391
  196. data/vendor/assets/javascripts/ace/mode-ruby-uncompressed.js +0 -391
  197. data/vendor/assets/javascripts/ace/mode-scad-noconflict.js +0 -1
  198. data/vendor/assets/javascripts/ace/mode-scad-uncompressed-noconflict.js +0 -906
  199. data/vendor/assets/javascripts/ace/mode-scad-uncompressed.js +0 -906
  200. data/vendor/assets/javascripts/ace/mode-scala-noconflict.js +0 -1
  201. data/vendor/assets/javascripts/ace/mode-scala-uncompressed-noconflict.js +0 -1300
  202. data/vendor/assets/javascripts/ace/mode-scala-uncompressed.js +0 -1300
  203. data/vendor/assets/javascripts/ace/mode-scss-noconflict.js +0 -1
  204. data/vendor/assets/javascripts/ace/mode-scss-uncompressed-noconflict.js +0 -678
  205. data/vendor/assets/javascripts/ace/mode-scss-uncompressed.js +0 -678
  206. data/vendor/assets/javascripts/ace/mode-sh-noconflict.js +0 -1
  207. data/vendor/assets/javascripts/ace/mode-sh-uncompressed-noconflict.js +0 -281
  208. data/vendor/assets/javascripts/ace/mode-sh-uncompressed.js +0 -281
  209. data/vendor/assets/javascripts/ace/mode-sql-noconflict.js +0 -1
  210. data/vendor/assets/javascripts/ace/mode-sql-uncompressed-noconflict.js +0 -159
  211. data/vendor/assets/javascripts/ace/mode-sql-uncompressed.js +0 -159
  212. data/vendor/assets/javascripts/ace/mode-svg-noconflict.js +0 -1
  213. data/vendor/assets/javascripts/ace/mode-svg-uncompressed-noconflict.js +0 -2034
  214. data/vendor/assets/javascripts/ace/mode-svg-uncompressed.js +0 -2034
  215. data/vendor/assets/javascripts/ace/mode-text-noconflict.js +0 -0
  216. data/vendor/assets/javascripts/ace/mode-text-uncompressed-noconflict.js +0 -0
  217. data/vendor/assets/javascripts/ace/mode-text-uncompressed.js +0 -0
  218. data/vendor/assets/javascripts/ace/mode-textile-noconflict.js +0 -1
  219. data/vendor/assets/javascripts/ace/mode-textile-uncompressed-noconflict.js +0 -254
  220. data/vendor/assets/javascripts/ace/mode-textile-uncompressed.js +0 -254
  221. data/vendor/assets/javascripts/ace/mode-xml-noconflict.js +0 -1
  222. data/vendor/assets/javascripts/ace/mode-xml-uncompressed-noconflict.js +0 -1001
  223. data/vendor/assets/javascripts/ace/mode-xml-uncompressed.js +0 -1001
  224. data/vendor/assets/javascripts/ace/mode-xquery-noconflict.js +0 -1
  225. data/vendor/assets/javascripts/ace/mode-xquery-uncompressed-noconflict.js +0 -538
  226. data/vendor/assets/javascripts/ace/mode-xquery-uncompressed.js +0 -538
  227. data/vendor/assets/javascripts/ace/theme-chrome-noconflict.js +0 -1
  228. data/vendor/assets/javascripts/ace/theme-chrome-uncompressed-noconflict.js +0 -212
  229. data/vendor/assets/javascripts/ace/theme-chrome-uncompressed.js +0 -212
  230. data/vendor/assets/javascripts/ace/theme-clouds-noconflict.js +0 -1
  231. data/vendor/assets/javascripts/ace/theme-clouds-uncompressed-noconflict.js +0 -155
  232. data/vendor/assets/javascripts/ace/theme-clouds-uncompressed.js +0 -155
  233. data/vendor/assets/javascripts/ace/theme-clouds_midnight-noconflict.js +0 -1
  234. data/vendor/assets/javascripts/ace/theme-clouds_midnight-uncompressed-noconflict.js +0 -156
  235. data/vendor/assets/javascripts/ace/theme-clouds_midnight-uncompressed.js +0 -156
  236. data/vendor/assets/javascripts/ace/theme-cobalt-noconflict.js +0 -1
  237. data/vendor/assets/javascripts/ace/theme-cobalt-uncompressed-noconflict.js +0 -174
  238. data/vendor/assets/javascripts/ace/theme-cobalt-uncompressed.js +0 -174
  239. data/vendor/assets/javascripts/ace/theme-crimson_editor-noconflict.js +0 -1
  240. data/vendor/assets/javascripts/ace/theme-crimson_editor-uncompressed-noconflict.js +0 -198
  241. data/vendor/assets/javascripts/ace/theme-crimson_editor-uncompressed.js +0 -198
  242. data/vendor/assets/javascripts/ace/theme-dawn-noconflict.js +0 -1
  243. data/vendor/assets/javascripts/ace/theme-dawn-uncompressed-noconflict.js +0 -178
  244. data/vendor/assets/javascripts/ace/theme-dawn-uncompressed.js +0 -178
  245. data/vendor/assets/javascripts/ace/theme-dreamweaver-noconflict.js +0 -1
  246. data/vendor/assets/javascripts/ace/theme-dreamweaver-uncompressed-noconflict.js +0 -227
  247. data/vendor/assets/javascripts/ace/theme-dreamweaver-uncompressed.js +0 -227
  248. data/vendor/assets/javascripts/ace/theme-eclipse-noconflict.js +0 -1
  249. data/vendor/assets/javascripts/ace/theme-eclipse-uncompressed-noconflict.js +0 -147
  250. data/vendor/assets/javascripts/ace/theme-eclipse-uncompressed.js +0 -147
  251. data/vendor/assets/javascripts/ace/theme-idle_fingers-noconflict.js +0 -1
  252. data/vendor/assets/javascripts/ace/theme-idle_fingers-uncompressed-noconflict.js +0 -166
  253. data/vendor/assets/javascripts/ace/theme-idle_fingers-uncompressed.js +0 -166
  254. data/vendor/assets/javascripts/ace/theme-kr_theme-noconflict.js +0 -1
  255. data/vendor/assets/javascripts/ace/theme-kr_theme-uncompressed-noconflict.js +0 -169
  256. data/vendor/assets/javascripts/ace/theme-kr_theme-uncompressed.js +0 -169
  257. data/vendor/assets/javascripts/ace/theme-kr_theme.js +0 -1
  258. data/vendor/assets/javascripts/ace/theme-merbivore-noconflict.js +0 -1
  259. data/vendor/assets/javascripts/ace/theme-merbivore-uncompressed-noconflict.js +0 -169
  260. data/vendor/assets/javascripts/ace/theme-merbivore-uncompressed.js +0 -169
  261. data/vendor/assets/javascripts/ace/theme-merbivore_soft-noconflict.js +0 -1
  262. data/vendor/assets/javascripts/ace/theme-merbivore_soft-uncompressed-noconflict.js +0 -175
  263. data/vendor/assets/javascripts/ace/theme-merbivore_soft-uncompressed.js +0 -175
  264. data/vendor/assets/javascripts/ace/theme-mono_industrial-noconflict.js +0 -1
  265. data/vendor/assets/javascripts/ace/theme-mono_industrial-uncompressed-noconflict.js +0 -177
  266. data/vendor/assets/javascripts/ace/theme-mono_industrial-uncompressed.js +0 -177
  267. data/vendor/assets/javascripts/ace/theme-monokai-noconflict.js +0 -1
  268. data/vendor/assets/javascripts/ace/theme-monokai-uncompressed-noconflict.js +0 -183
  269. data/vendor/assets/javascripts/ace/theme-monokai-uncompressed.js +0 -183
  270. data/vendor/assets/javascripts/ace/theme-pastel_on_dark-noconflict.js +0 -1
  271. data/vendor/assets/javascripts/ace/theme-pastel_on_dark-uncompressed-noconflict.js +0 -179
  272. data/vendor/assets/javascripts/ace/theme-pastel_on_dark-uncompressed.js +0 -179
  273. data/vendor/assets/javascripts/ace/theme-solarized_dark-noconflict.js +0 -1
  274. data/vendor/assets/javascripts/ace/theme-solarized_dark-uncompressed-noconflict.js +0 -168
  275. data/vendor/assets/javascripts/ace/theme-solarized_dark-uncompressed.js +0 -168
  276. data/vendor/assets/javascripts/ace/theme-solarized_light-noconflict.js +0 -1
  277. data/vendor/assets/javascripts/ace/theme-solarized_light-uncompressed-noconflict.js +0 -167
  278. data/vendor/assets/javascripts/ace/theme-solarized_light-uncompressed.js +0 -167
  279. data/vendor/assets/javascripts/ace/theme-textmate-noconflict.js +0 -0
  280. data/vendor/assets/javascripts/ace/theme-textmate-uncompressed-noconflict.js +0 -0
  281. data/vendor/assets/javascripts/ace/theme-textmate-uncompressed.js +0 -0
  282. data/vendor/assets/javascripts/ace/theme-tomorrow-noconflict.js +0 -1
  283. data/vendor/assets/javascripts/ace/theme-tomorrow-uncompressed-noconflict.js +0 -201
  284. data/vendor/assets/javascripts/ace/theme-tomorrow-uncompressed.js +0 -201
  285. data/vendor/assets/javascripts/ace/theme-tomorrow_night-noconflict.js +0 -1
  286. data/vendor/assets/javascripts/ace/theme-tomorrow_night-uncompressed-noconflict.js +0 -201
  287. data/vendor/assets/javascripts/ace/theme-tomorrow_night-uncompressed.js +0 -201
  288. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-noconflict.js +0 -1
  289. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -201
  290. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-uncompressed.js +0 -201
  291. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-noconflict.js +0 -1
  292. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -201
  293. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-uncompressed.js +0 -201
  294. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-noconflict.js +0 -1
  295. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -197
  296. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-uncompressed.js +0 -197
  297. data/vendor/assets/javascripts/ace/theme-twilight-noconflict.js +0 -1
  298. data/vendor/assets/javascripts/ace/theme-twilight-uncompressed-noconflict.js +0 -191
  299. data/vendor/assets/javascripts/ace/theme-twilight-uncompressed.js +0 -191
  300. data/vendor/assets/javascripts/ace/theme-vibrant_ink-noconflict.js +0 -1
  301. data/vendor/assets/javascripts/ace/theme-vibrant_ink-uncompressed-noconflict.js +0 -170
  302. data/vendor/assets/javascripts/ace/theme-vibrant_ink-uncompressed.js +0 -170
  303. data/vendor/assets/javascripts/aced-api.js.coffee +0 -116
  304. data/vendor/assets/javascripts/jquery.random.js +0 -31
@@ -1,1300 +0,0 @@
1
- ace.define('ace/mode/java', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/java_highlight_rules'], function(require, exports, module) {
2
- "use strict";
3
-
4
- var oop = require("../lib/oop");
5
- var JavaScriptMode = require("./javascript").Mode;
6
- var Tokenizer = require("../tokenizer").Tokenizer;
7
- var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
8
-
9
- var Mode = function() {
10
- JavaScriptMode.call(this);
11
-
12
- this.$tokenizer = new Tokenizer(new JavaHighlightRules().getRules());
13
- };
14
- oop.inherits(Mode, JavaScriptMode);
15
-
16
- (function() {
17
-
18
- this.createWorker = function(session) {
19
- return null;
20
- };
21
-
22
- }).call(Mode.prototype);
23
-
24
- exports.Mode = Mode;
25
- });
26
- /* ***** BEGIN LICENSE BLOCK *****
27
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
28
- *
29
- * The contents of this file are subject to the Mozilla Public License Version
30
- * 1.1 (the "License"); you may not use this file except in compliance with
31
- * the License. You may obtain a copy of the License at
32
- * http://www.mozilla.org/MPL/
33
- *
34
- * Software distributed under the License is distributed on an "AS IS" basis,
35
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
36
- * for the specific language governing rights and limitations under the
37
- * License.
38
- *
39
- * The Original Code is Ajax.org Code Editor (ACE).
40
- *
41
- * The Initial Developer of the Original Code is
42
- * Ajax.org B.V.
43
- * Portions created by the Initial Developer are Copyright (C) 2010
44
- * the Initial Developer. All Rights Reserved.
45
- *
46
- * Contributor(s):
47
- * Fabian Jakobs <fabian AT ajax DOT org>
48
- *
49
- * Alternatively, the contents of this file may be used under the terms of
50
- * either the GNU General Public License Version 2 or later (the "GPL"), or
51
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
52
- * in which case the provisions of the GPL or the LGPL are applicable instead
53
- * of those above. If you wish to allow use of your version of this file only
54
- * under the terms of either the GPL or the LGPL, and not to allow others to
55
- * use your version of this file under the terms of the MPL, indicate your
56
- * decision by deleting the provisions above and replace them with the notice
57
- * and other provisions required by the GPL or the LGPL. If you do not delete
58
- * the provisions above, a recipient may use your version of this file under
59
- * the terms of any one of the MPL, the GPL or the LGPL.
60
- *
61
- * ***** END LICENSE BLOCK ***** */
62
-
63
- ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
64
- "use strict";
65
-
66
- var oop = require("../lib/oop");
67
- var TextMode = require("./text").Mode;
68
- var Tokenizer = require("../tokenizer").Tokenizer;
69
- var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
70
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
71
- var Range = require("../range").Range;
72
- var WorkerClient = require("../worker/worker_client").WorkerClient;
73
- var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
74
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
75
-
76
- var Mode = function() {
77
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
78
- this.$outdent = new MatchingBraceOutdent();
79
- this.$behaviour = new CstyleBehaviour();
80
- this.foldingRules = new CStyleFoldMode();
81
- };
82
- oop.inherits(Mode, TextMode);
83
-
84
- (function() {
85
-
86
-
87
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
88
- var outdent = true;
89
- var re = /^(\s*)\/\//;
90
-
91
- for (var i=startRow; i<= endRow; i++) {
92
- if (!re.test(doc.getLine(i))) {
93
- outdent = false;
94
- break;
95
- }
96
- }
97
-
98
- if (outdent) {
99
- var deleteRange = new Range(0, 0, 0, 0);
100
- for (var i=startRow; i<= endRow; i++)
101
- {
102
- var line = doc.getLine(i);
103
- var m = line.match(re);
104
- deleteRange.start.row = i;
105
- deleteRange.end.row = i;
106
- deleteRange.end.column = m[0].length;
107
- doc.replace(deleteRange, m[1]);
108
- }
109
- }
110
- else {
111
- doc.indentRows(startRow, endRow, "//");
112
- }
113
- };
114
-
115
- this.getNextLineIndent = function(state, line, tab) {
116
- var indent = this.$getIndent(line);
117
-
118
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
119
- var tokens = tokenizedLine.tokens;
120
- var endState = tokenizedLine.state;
121
-
122
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
123
- return indent;
124
- }
125
-
126
- if (state == "start" || state == "regex_allowed") {
127
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
128
- if (match) {
129
- indent += tab;
130
- }
131
- } else if (state == "doc-start") {
132
- if (endState == "start" || state == "regex_allowed") {
133
- return "";
134
- }
135
- var match = line.match(/^\s*(\/?)\*/);
136
- if (match) {
137
- if (match[1]) {
138
- indent += " ";
139
- }
140
- indent += "* ";
141
- }
142
- }
143
-
144
- return indent;
145
- };
146
-
147
- this.checkOutdent = function(state, line, input) {
148
- return this.$outdent.checkOutdent(line, input);
149
- };
150
-
151
- this.autoOutdent = function(state, doc, row) {
152
- this.$outdent.autoOutdent(doc, row);
153
- };
154
-
155
- this.createWorker = function(session) {
156
- var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
157
- worker.attachToDocument(session.getDocument());
158
-
159
- worker.on("jslint", function(results) {
160
- var errors = [];
161
- for (var i=0; i<results.data.length; i++) {
162
- var error = results.data[i];
163
- if (error)
164
- errors.push({
165
- row: error.line-1,
166
- column: error.character-1,
167
- text: error.reason,
168
- type: "warning",
169
- lint: error
170
- });
171
- }
172
- session.setAnnotations(errors);
173
- });
174
-
175
- worker.on("narcissus", function(e) {
176
- session.setAnnotations([e.data]);
177
- });
178
-
179
- worker.on("terminate", function() {
180
- session.clearAnnotations();
181
- });
182
-
183
- return worker;
184
- };
185
-
186
- }).call(Mode.prototype);
187
-
188
- exports.Mode = Mode;
189
- });
190
- /* ***** BEGIN LICENSE BLOCK *****
191
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
192
- *
193
- * The contents of this file are subject to the Mozilla Public License Version
194
- * 1.1 (the "License"); you may not use this file except in compliance with
195
- * the License. You may obtain a copy of the License at
196
- * http://www.mozilla.org/MPL/
197
- *
198
- * Software distributed under the License is distributed on an "AS IS" basis,
199
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
200
- * for the specific language governing rights and limitations under the
201
- * License.
202
- *
203
- * The Original Code is Ajax.org Code Editor (ACE).
204
- *
205
- * The Initial Developer of the Original Code is
206
- * Ajax.org B.V.
207
- * Portions created by the Initial Developer are Copyright (C) 2010
208
- * the Initial Developer. All Rights Reserved.
209
- *
210
- * Contributor(s):
211
- * Fabian Jakobs <fabian AT ajax DOT org>
212
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
213
- *
214
- * Alternatively, the contents of this file may be used under the terms of
215
- * either the GNU General Public License Version 2 or later (the "GPL"), or
216
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
217
- * in which case the provisions of the GPL or the LGPL are applicable instead
218
- * of those above. If you wish to allow use of your version of this file only
219
- * under the terms of either the GPL or the LGPL, and not to allow others to
220
- * use your version of this file under the terms of the MPL, indicate your
221
- * decision by deleting the provisions above and replace them with the notice
222
- * and other provisions required by the GPL or the LGPL. If you do not delete
223
- * the provisions above, a recipient may use your version of this file under
224
- * the terms of any one of the MPL, the GPL or the LGPL.
225
- *
226
- * ***** END LICENSE BLOCK ***** */
227
-
228
- ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
229
- "use strict";
230
-
231
- var oop = require("../lib/oop");
232
- var lang = require("../lib/lang");
233
- var unicode = require("../unicode");
234
- var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
235
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
236
-
237
- var JavaScriptHighlightRules = function() {
238
-
239
- // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
240
- var globals = lang.arrayToMap(
241
- // Constructors
242
- ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
243
- // E4X
244
- "Namespace|QName|XML|XMLList|" +
245
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
246
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
247
- // Errors
248
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
249
- "SyntaxError|TypeError|URIError|" +
250
- // Non-constructor functions
251
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
252
- "isNaN|parseFloat|parseInt|" +
253
- // Other
254
- "JSON|Math|" +
255
- // Pseudo
256
- "this|arguments|prototype|window|document"
257
- ).split("|")
258
- );
259
-
260
- var keywords = lang.arrayToMap(
261
- ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
262
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
263
- "const|yield|import|get|set").split("|")
264
- );
265
-
266
- // keywords which can be followed by regular expressions
267
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
268
-
269
- var deprecated = lang.arrayToMap(
270
- ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
271
- );
272
-
273
- var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
274
-
275
- var buildinConstants = lang.arrayToMap(
276
- ("null|Infinity|NaN|undefined").split("|")
277
- );
278
-
279
- var futureReserved = lang.arrayToMap(
280
- ("class|enum|extends|super|export|implements|private|" +
281
- "public|interface|package|protected|static").split("|")
282
- );
283
-
284
- // TODO: Unicode escape sequences
285
- var identifierRe = "[" + unicode.packages.L + "\\$_]["
286
- + unicode.packages.L
287
- + unicode.packages.Mn + unicode.packages.Mc
288
- + unicode.packages.Nd
289
- + unicode.packages.Pc + "\\$_]*\\b";
290
-
291
- var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
292
- "u[0-9a-fA-F]{4}|" + // unicode
293
- "[0-2][0-7]{0,2}|" + // oct
294
- "3[0-6][0-7]?|" + // oct
295
- "37[0-7]?|" + // oct
296
- "[4-7][0-7]?|" + //oct
297
- ".)";
298
-
299
- // regexp must not have capturing parentheses. Use (?:) instead.
300
- // regexps are ordered -> the first match is used
301
-
302
- this.$rules = {
303
- "start" : [
304
- {
305
- token : "comment",
306
- regex : "\\/\\/.*$"
307
- },
308
- new DocCommentHighlightRules().getStartRule("doc-start"),
309
- {
310
- token : "comment", // multi line comment
311
- merge : true,
312
- regex : "\\/\\*",
313
- next : "comment"
314
- }, {
315
- token : "string",
316
- regex : "'",
317
- next : "qstring"
318
- }, {
319
- token : "string",
320
- regex : '"',
321
- next : "qqstring"
322
- }, {
323
- token : "constant.numeric", // hex
324
- regex : "0[xX][0-9a-fA-F]+\\b"
325
- }, {
326
- token : "constant.numeric", // float
327
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
328
- }, { // match stuff like: Sound.prototype.play = function() { }
329
- token : ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
330
- regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)?(\\s*)(\\()(.*?)(\\))"
331
- }, { // match stuff like: Sound.prototype.play = myfunc
332
- token : ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text"],
333
- regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)"
334
- }, { // match stuff like: Sound.play = function() { }
335
- token : ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
336
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)?(\\s*)(\\()(.*?)(\\))"
337
- }, { // match stuff like: play = function() { }
338
- token : ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
339
- regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)?(\\s*)(\\()(.*?)(\\))"
340
- }, { // match regular function like: function myFunc(arg) { }
341
- token : ["storage.type", "text", "entity.name.function", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
342
- regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()(.*?)(\\))"
343
- }, { // match stuff like: foobar: function() { }
344
- token : ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
345
- regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)?(\\s*)(\\()(.*?)(\\))"
346
- }, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
347
- token : ["text", "text", "storage.type", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
348
- regex : "(:)(\\s*)(function)?(\\s*)(\\()([^)]*)(\\))"
349
- }, {
350
- token : "constant.language.boolean",
351
- regex : "(?:true|false)\\b"
352
- }, {
353
- token : "keyword",
354
- regex : "(?:" + kwBeforeRe + ")\\b",
355
- next : "regex_allowed"
356
- }, {
357
- token : "support.function",
358
- regex : "\\b(?:s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()"
359
- }, {
360
- token : "support.function.dom",
361
- regex : "\\b(?:s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()"
362
- }, {
363
- token : "support.function.constant",
364
- regex : "\\b(?:s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\\b"
365
- }, {
366
- token : ["punctuation.operator", "support.function.firebug"],
367
- regex : "(\\.)(warn|info|log|error|time|timeEnd|assert)\\b"
368
-
369
- }, {
370
- token : function(value) {
371
- if (globals.hasOwnProperty(value))
372
- return "variable.language";
373
- else if (deprecated.hasOwnProperty(value))
374
- return "invalid.deprecated";
375
- else if (definitions.hasOwnProperty(value))
376
- return "storage.type";
377
- else if (keywords.hasOwnProperty(value))
378
- return "keyword";
379
- else if (buildinConstants.hasOwnProperty(value))
380
- return "constant.language";
381
- else if (futureReserved.hasOwnProperty(value))
382
- return "invalid.illegal";
383
- else if (value == "debugger")
384
- return "invalid.deprecated";
385
- else
386
- return "identifier";
387
- },
388
- regex : identifierRe
389
- }, {
390
- token : "keyword.operator",
391
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
392
- next : "regex_allowed"
393
- }, {
394
- token : "punctuation.operator",
395
- regex : "\\?|\\:|\\,|\\;|\\.",
396
- next : "regex_allowed"
397
- }, {
398
- token : "paren.lparen",
399
- regex : "[[({]",
400
- next : "regex_allowed"
401
- }, {
402
- token : "paren.rparen",
403
- regex : "[\\])}]"
404
- }, {
405
- token : "keyword.operator",
406
- regex : "\\/=?",
407
- next : "regex_allowed"
408
- }, {
409
- token: "comment",
410
- regex: "^#!.*$"
411
- }, {
412
- token : "text",
413
- regex : "\\s+"
414
- }
415
- ],
416
- // regular expressions are only allowed after certain tokens. This
417
- // makes sure we don't mix up regexps with the divison operator
418
- "regex_allowed": [
419
- {
420
- token : "comment", // multi line comment
421
- merge : true,
422
- regex : "\\/\\*",
423
- next : "comment_regex_allowed"
424
- }, {
425
- token : "comment",
426
- regex : "\\/\\/.*$"
427
- }, {
428
- token: "string.regexp",
429
- regex: "\\/",
430
- next: "regex",
431
- merge: true
432
- }, {
433
- token : "text",
434
- regex : "\\s+"
435
- }, {
436
- // immediately return to the start mode without matching
437
- // anything
438
- token: "empty",
439
- regex: "",
440
- next: "start"
441
- }
442
- ],
443
- "regex": [
444
- {
445
- token: "regexp.keyword.operator",
446
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
447
- next: "regex"
448
- }, {
449
- // flag
450
- token: "string.regexp",
451
- regex: "/\\w*",
452
- next: "start",
453
- merge: true
454
- }, {
455
- token: "string.regexp",
456
- regex: "[^\\\\/\\[]+",
457
- next: "regex",
458
- merge: true
459
- }, {
460
- token: "string.regexp.charachterclass",
461
- regex: "\\[",
462
- next: "regex_character_class",
463
- merge: true
464
- }, {
465
- token: "empty",
466
- regex: "",
467
- next: "start"
468
- }
469
- ],
470
- "regex_character_class": [
471
- {
472
- token: "regexp.keyword.operator",
473
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
474
- next: "regex_character_class"
475
- }, {
476
- token: "string.regexp.charachterclass",
477
- regex: "]",
478
- next: "regex",
479
- merge: true
480
- }, {
481
- token: "string.regexp.charachterclass",
482
- regex: "[^\\\\\\]]+",
483
- next: "regex_character_class",
484
- merge: true
485
- }, {
486
- token: "empty",
487
- regex: "",
488
- next: "start"
489
- }
490
- ],
491
- "comment_regex_allowed" : [
492
- {
493
- token : "comment", // closing comment
494
- regex : ".*?\\*\\/",
495
- merge : true,
496
- next : "regex_allowed"
497
- }, {
498
- token : "comment", // comment spanning whole line
499
- merge : true,
500
- regex : ".+"
501
- }
502
- ],
503
- "comment" : [
504
- {
505
- token : "comment", // closing comment
506
- regex : ".*?\\*\\/",
507
- merge : true,
508
- next : "start"
509
- }, {
510
- token : "comment", // comment spanning whole line
511
- merge : true,
512
- regex : ".+"
513
- }
514
- ],
515
- "qqstring" : [
516
- {
517
- token : "constant.language.escape",
518
- regex : escapedRe
519
- }, {
520
- token : "string",
521
- regex : '[^"\\\\]+'
522
- }, {
523
- token : "string",
524
- regex : '"',
525
- next : "start"
526
- }
527
- ],
528
- "qstring" : [
529
- {
530
- token : "constant.language.escape",
531
- regex : escapedRe
532
- }, {
533
- token : "string",
534
- regex : "[^'\\\\]+"
535
- }, {
536
- token : "string",
537
- regex : "'",
538
- next : "start"
539
- }
540
- ]
541
- };
542
-
543
- this.embedRules(DocCommentHighlightRules, "doc-",
544
- [ new DocCommentHighlightRules().getEndRule("start") ]);
545
- };
546
-
547
- oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
548
-
549
- exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
550
- });
551
- /* ***** BEGIN LICENSE BLOCK *****
552
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
553
- *
554
- * The contents of this file are subject to the Mozilla Public License Version
555
- * 1.1 (the "License"); you may not use this file except in compliance with
556
- * the License. You may obtain a copy of the License at
557
- * http://www.mozilla.org/MPL/
558
- *
559
- * Software distributed under the License is distributed on an "AS IS" basis,
560
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
561
- * for the specific language governing rights and limitations under the
562
- * License.
563
- *
564
- * The Original Code is Ajax.org Code Editor (ACE).
565
- *
566
- * The Initial Developer of the Original Code is
567
- * Ajax.org B.V.
568
- * Portions created by the Initial Developer are Copyright (C) 2010
569
- * the Initial Developer. All Rights Reserved.
570
- *
571
- * Contributor(s):
572
- * Fabian Jakobs <fabian AT ajax DOT org>
573
- *
574
- * Alternatively, the contents of this file may be used under the terms of
575
- * either the GNU General Public License Version 2 or later (the "GPL"), or
576
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
577
- * in which case the provisions of the GPL or the LGPL are applicable instead
578
- * of those above. If you wish to allow use of your version of this file only
579
- * under the terms of either the GPL or the LGPL, and not to allow others to
580
- * use your version of this file under the terms of the MPL, indicate your
581
- * decision by deleting the provisions above and replace them with the notice
582
- * and other provisions required by the GPL or the LGPL. If you do not delete
583
- * the provisions above, a recipient may use your version of this file under
584
- * the terms of any one of the MPL, the GPL or the LGPL.
585
- *
586
- * ***** END LICENSE BLOCK ***** */
587
-
588
- ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
589
- "use strict";
590
-
591
- var oop = require("../lib/oop");
592
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
593
-
594
- var DocCommentHighlightRules = function() {
595
-
596
- this.$rules = {
597
- "start" : [ {
598
- token : "comment.doc.tag",
599
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
600
- }, {
601
- token : "comment.doc",
602
- merge : true,
603
- regex : "\\s+"
604
- }, {
605
- token : "comment.doc",
606
- merge : true,
607
- regex : "TODO"
608
- }, {
609
- token : "comment.doc",
610
- merge : true,
611
- regex : "[^@\\*]+"
612
- }, {
613
- token : "comment.doc",
614
- merge : true,
615
- regex : "."
616
- }]
617
- };
618
- };
619
-
620
- oop.inherits(DocCommentHighlightRules, TextHighlightRules);
621
-
622
- (function() {
623
-
624
- this.getStartRule = function(start) {
625
- return {
626
- token : "comment.doc", // doc comment
627
- merge : true,
628
- regex : "\\/\\*(?=\\*)",
629
- next : start
630
- };
631
- };
632
-
633
- this.getEndRule = function (start) {
634
- return {
635
- token : "comment.doc", // closing comment
636
- merge : true,
637
- regex : "\\*\\/",
638
- next : start
639
- };
640
- };
641
-
642
- }).call(DocCommentHighlightRules.prototype);
643
-
644
- exports.DocCommentHighlightRules = DocCommentHighlightRules;
645
-
646
- });
647
- /* ***** BEGIN LICENSE BLOCK *****
648
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
649
- *
650
- * The contents of this file are subject to the Mozilla Public License Version
651
- * 1.1 (the "License"); you may not use this file except in compliance with
652
- * the License. You may obtain a copy of the License at
653
- * http://www.mozilla.org/MPL/
654
- *
655
- * Software distributed under the License is distributed on an "AS IS" basis,
656
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
657
- * for the specific language governing rights and limitations under the
658
- * License.
659
- *
660
- * The Original Code is Ajax.org Code Editor (ACE).
661
- *
662
- * The Initial Developer of the Original Code is
663
- * Ajax.org B.V.
664
- * Portions created by the Initial Developer are Copyright (C) 2010
665
- * the Initial Developer. All Rights Reserved.
666
- *
667
- * Contributor(s):
668
- * Fabian Jakobs <fabian AT ajax DOT org>
669
- *
670
- * Alternatively, the contents of this file may be used under the terms of
671
- * either the GNU General Public License Version 2 or later (the "GPL"), or
672
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
673
- * in which case the provisions of the GPL or the LGPL are applicable instead
674
- * of those above. If you wish to allow use of your version of this file only
675
- * under the terms of either the GPL or the LGPL, and not to allow others to
676
- * use your version of this file under the terms of the MPL, indicate your
677
- * decision by deleting the provisions above and replace them with the notice
678
- * and other provisions required by the GPL or the LGPL. If you do not delete
679
- * the provisions above, a recipient may use your version of this file under
680
- * the terms of any one of the MPL, the GPL or the LGPL.
681
- *
682
- * ***** END LICENSE BLOCK ***** */
683
-
684
- ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
685
- "use strict";
686
-
687
- var Range = require("../range").Range;
688
-
689
- var MatchingBraceOutdent = function() {};
690
-
691
- (function() {
692
-
693
- this.checkOutdent = function(line, input) {
694
- if (! /^\s+$/.test(line))
695
- return false;
696
-
697
- return /^\s*\}/.test(input);
698
- };
699
-
700
- this.autoOutdent = function(doc, row) {
701
- var line = doc.getLine(row);
702
- var match = line.match(/^(\s*\})/);
703
-
704
- if (!match) return 0;
705
-
706
- var column = match[1].length;
707
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
708
-
709
- if (!openBracePos || openBracePos.row == row) return 0;
710
-
711
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
712
- doc.replace(new Range(row, 0, row, column-1), indent);
713
- };
714
-
715
- this.$getIndent = function(line) {
716
- var match = line.match(/^(\s+)/);
717
- if (match) {
718
- return match[1];
719
- }
720
-
721
- return "";
722
- };
723
-
724
- }).call(MatchingBraceOutdent.prototype);
725
-
726
- exports.MatchingBraceOutdent = MatchingBraceOutdent;
727
- });
728
- /* vim:ts=4:sts=4:sw=4:
729
- * ***** BEGIN LICENSE BLOCK *****
730
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
731
- *
732
- * The contents of this file are subject to the Mozilla Public License Version
733
- * 1.1 (the "License"); you may not use this file except in compliance with
734
- * the License. You may obtain a copy of the License at
735
- * http://www.mozilla.org/MPL/
736
- *
737
- * Software distributed under the License is distributed on an "AS IS" basis,
738
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
739
- * for the specific language governing rights and limitations under the
740
- * License.
741
- *
742
- * The Original Code is Ajax.org Code Editor (ACE).
743
- *
744
- * The Initial Developer of the Original Code is
745
- * Ajax.org B.V.
746
- * Portions created by the Initial Developer are Copyright (C) 2010
747
- * the Initial Developer. All Rights Reserved.
748
- *
749
- * Contributor(s):
750
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
751
- *
752
- * Alternatively, the contents of this file may be used under the terms of
753
- * either the GNU General Public License Version 2 or later (the "GPL"), or
754
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
755
- * in which case the provisions of the GPL or the LGPL are applicable instead
756
- * of those above. If you wish to allow use of your version of this file only
757
- * under the terms of either the GPL or the LGPL, and not to allow others to
758
- * use your version of this file under the terms of the MPL, indicate your
759
- * decision by deleting the provisions above and replace them with the notice
760
- * and other provisions required by the GPL or the LGPL. If you do not delete
761
- * the provisions above, a recipient may use your version of this file under
762
- * the terms of any one of the MPL, the GPL or the LGPL.
763
- *
764
- * ***** END LICENSE BLOCK ***** */
765
-
766
- ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
767
- "use strict";
768
-
769
- var oop = require("../../lib/oop");
770
- var Behaviour = require('../behaviour').Behaviour;
771
-
772
- var CstyleBehaviour = function () {
773
-
774
- this.add("braces", "insertion", function (state, action, editor, session, text) {
775
- if (text == '{') {
776
- var selection = editor.getSelectionRange();
777
- var selected = session.doc.getTextRange(selection);
778
- if (selected !== "") {
779
- return {
780
- text: '{' + selected + '}',
781
- selection: false
782
- }
783
- } else {
784
- return {
785
- text: '{}',
786
- selection: [1, 1]
787
- }
788
- }
789
- } else if (text == '}') {
790
- var cursor = editor.getCursorPosition();
791
- var line = session.doc.getLine(cursor.row);
792
- var rightChar = line.substring(cursor.column, cursor.column + 1);
793
- if (rightChar == '}') {
794
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
795
- if (matching !== null) {
796
- return {
797
- text: '',
798
- selection: [1, 1]
799
- }
800
- }
801
- }
802
- } else if (text == "\n") {
803
- var cursor = editor.getCursorPosition();
804
- var line = session.doc.getLine(cursor.row);
805
- var rightChar = line.substring(cursor.column, cursor.column + 1);
806
- if (rightChar == '}') {
807
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
808
- if (!openBracePos)
809
- return null;
810
-
811
- var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
812
- var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
813
-
814
- return {
815
- text: '\n' + indent + '\n' + next_indent,
816
- selection: [1, indent.length, 1, indent.length]
817
- }
818
- }
819
- }
820
- });
821
-
822
- this.add("braces", "deletion", function (state, action, editor, session, range) {
823
- var selected = session.doc.getTextRange(range);
824
- if (!range.isMultiLine() && selected == '{') {
825
- var line = session.doc.getLine(range.start.row);
826
- var rightChar = line.substring(range.end.column, range.end.column + 1);
827
- if (rightChar == '}') {
828
- range.end.column++;
829
- return range;
830
- }
831
- }
832
- });
833
-
834
- this.add("parens", "insertion", function (state, action, editor, session, text) {
835
- if (text == '(') {
836
- var selection = editor.getSelectionRange();
837
- var selected = session.doc.getTextRange(selection);
838
- if (selected !== "") {
839
- return {
840
- text: '(' + selected + ')',
841
- selection: false
842
- }
843
- } else {
844
- return {
845
- text: '()',
846
- selection: [1, 1]
847
- }
848
- }
849
- } else if (text == ')') {
850
- var cursor = editor.getCursorPosition();
851
- var line = session.doc.getLine(cursor.row);
852
- var rightChar = line.substring(cursor.column, cursor.column + 1);
853
- if (rightChar == ')') {
854
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
855
- if (matching !== null) {
856
- return {
857
- text: '',
858
- selection: [1, 1]
859
- }
860
- }
861
- }
862
- }
863
- });
864
-
865
- this.add("parens", "deletion", function (state, action, editor, session, range) {
866
- var selected = session.doc.getTextRange(range);
867
- if (!range.isMultiLine() && selected == '(') {
868
- var line = session.doc.getLine(range.start.row);
869
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
870
- if (rightChar == ')') {
871
- range.end.column++;
872
- return range;
873
- }
874
- }
875
- });
876
-
877
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
878
- if (text == '"') {
879
- var selection = editor.getSelectionRange();
880
- var selected = session.doc.getTextRange(selection);
881
- if (selected !== "") {
882
- return {
883
- text: '"' + selected + '"',
884
- selection: false
885
- }
886
- } else {
887
- var cursor = editor.getCursorPosition();
888
- var line = session.doc.getLine(cursor.row);
889
- var leftChar = line.substring(cursor.column-1, cursor.column);
890
-
891
- // We're escaped.
892
- if (leftChar == '\\') {
893
- return null;
894
- }
895
-
896
- // Find what token we're inside.
897
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
898
- var col = 0, token;
899
- var quotepos = -1; // Track whether we're inside an open quote.
900
-
901
- for (var x = 0; x < tokens.length; x++) {
902
- token = tokens[x];
903
- if (token.type == "string") {
904
- quotepos = -1;
905
- } else if (quotepos < 0) {
906
- quotepos = token.value.indexOf('"');
907
- }
908
- if ((token.value.length + col) > selection.start.column) {
909
- break;
910
- }
911
- col += tokens[x].value.length;
912
- }
913
-
914
- // Try and be smart about when we auto insert.
915
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
916
- return {
917
- text: '""',
918
- selection: [1,1]
919
- }
920
- } else if (token && token.type === "string") {
921
- // Ignore input and move right one if we're typing over the closing quote.
922
- var rightChar = line.substring(cursor.column, cursor.column + 1);
923
- if (rightChar == '"') {
924
- return {
925
- text: '',
926
- selection: [1, 1]
927
- }
928
- }
929
- }
930
- }
931
- }
932
- });
933
-
934
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
935
- var selected = session.doc.getTextRange(range);
936
- if (!range.isMultiLine() && selected == '"') {
937
- var line = session.doc.getLine(range.start.row);
938
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
939
- if (rightChar == '"') {
940
- range.end.column++;
941
- return range;
942
- }
943
- }
944
- });
945
-
946
- }
947
- oop.inherits(CstyleBehaviour, Behaviour);
948
-
949
- exports.CstyleBehaviour = CstyleBehaviour;
950
- });/* ***** BEGIN LICENSE BLOCK *****
951
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
952
- *
953
- * The contents of this file are subject to the Mozilla Public License Version
954
- * 1.1 (the "License"); you may not use this file except in compliance with
955
- * the License. You may obtain a copy of the License at
956
- * http://www.mozilla.org/MPL/
957
- *
958
- * Software distributed under the License is distributed on an "AS IS" basis,
959
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
960
- * for the specific language governing rights and limitations under the
961
- * License.
962
- *
963
- * The Original Code is Ajax.org Code Editor (ACE).
964
- *
965
- * The Initial Developer of the Original Code is
966
- * Ajax.org B.V.
967
- * Portions created by the Initial Developer are Copyright (C) 2010
968
- * the Initial Developer. All Rights Reserved.
969
- *
970
- * Contributor(s):
971
- * Fabian Jakobs <fabian AT ajax DOT org>
972
- *
973
- * Alternatively, the contents of this file may be used under the terms of
974
- * either the GNU General Public License Version 2 or later (the "GPL"), or
975
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
976
- * in which case the provisions of the GPL or the LGPL are applicable instead
977
- * of those above. If you wish to allow use of your version of this file only
978
- * under the terms of either the GPL or the LGPL, and not to allow others to
979
- * use your version of this file under the terms of the MPL, indicate your
980
- * decision by deleting the provisions above and replace them with the notice
981
- * and other provisions required by the GPL or the LGPL. If you do not delete
982
- * the provisions above, a recipient may use your version of this file under
983
- * the terms of any one of the MPL, the GPL or the LGPL.
984
- *
985
- * ***** END LICENSE BLOCK ***** */
986
-
987
- ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
988
- "use strict";
989
-
990
- var oop = require("../../lib/oop");
991
- var Range = require("../../range").Range;
992
- var BaseFoldMode = require("./fold_mode").FoldMode;
993
-
994
- var FoldMode = exports.FoldMode = function() {};
995
- oop.inherits(FoldMode, BaseFoldMode);
996
-
997
- (function() {
998
-
999
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
1000
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
1001
-
1002
- this.getFoldWidgetRange = function(session, foldStyle, row) {
1003
- var line = session.getLine(row);
1004
- var match = line.match(this.foldingStartMarker);
1005
- if (match) {
1006
- var i = match.index;
1007
-
1008
- if (match[1])
1009
- return this.openingBracketBlock(session, match[1], row, i);
1010
-
1011
- var range = session.getCommentFoldRange(row, i + match[0].length);
1012
- range.end.column -= 2;
1013
- return range;
1014
- }
1015
-
1016
- if (foldStyle !== "markbeginend")
1017
- return;
1018
-
1019
- var match = line.match(this.foldingStopMarker);
1020
- if (match) {
1021
- var i = match.index + match[0].length;
1022
-
1023
- if (match[2]) {
1024
- var range = session.getCommentFoldRange(row, i);
1025
- range.end.column -= 2;
1026
- return range;
1027
- }
1028
-
1029
- var end = {row: row, column: i};
1030
- var start = session.$findOpeningBracket(match[1], end);
1031
-
1032
- if (!start)
1033
- return;
1034
-
1035
- start.column++;
1036
- end.column--;
1037
-
1038
- return Range.fromPoints(start, end);
1039
- }
1040
- };
1041
-
1042
- }).call(FoldMode.prototype);
1043
-
1044
- });/* ***** BEGIN LICENSE BLOCK *****
1045
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1046
- *
1047
- * The contents of this file are subject to the Mozilla Public License Version
1048
- * 1.1 (the "License"); you may not use this file except in compliance with
1049
- * the License. You may obtain a copy of the License at
1050
- * http://www.mozilla.org/MPL/
1051
- *
1052
- * Software distributed under the License is distributed on an "AS IS" basis,
1053
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1054
- * for the specific language governing rights and limitations under the
1055
- * License.
1056
- *
1057
- * The Original Code is Ajax.org Code Editor (ACE).
1058
- *
1059
- * The Initial Developer of the Original Code is
1060
- * Ajax.org B.V.
1061
- * Portions created by the Initial Developer are Copyright (C) 2010
1062
- * the Initial Developer. All Rights Reserved.
1063
- *
1064
- * Contributor(s):
1065
- * Fabian Jakobs <fabian AT ajax DOT org>
1066
- *
1067
- * Alternatively, the contents of this file may be used under the terms of
1068
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1069
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1070
- * in which case the provisions of the GPL or the LGPL are applicable instead
1071
- * of those above. If you wish to allow use of your version of this file only
1072
- * under the terms of either the GPL or the LGPL, and not to allow others to
1073
- * use your version of this file under the terms of the MPL, indicate your
1074
- * decision by deleting the provisions above and replace them with the notice
1075
- * and other provisions required by the GPL or the LGPL. If you do not delete
1076
- * the provisions above, a recipient may use your version of this file under
1077
- * the terms of any one of the MPL, the GPL or the LGPL.
1078
- *
1079
- * ***** END LICENSE BLOCK ***** */
1080
-
1081
- ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
1082
- "use strict";
1083
-
1084
- var Range = require("../../range").Range;
1085
-
1086
- var FoldMode = exports.FoldMode = function() {};
1087
-
1088
- (function() {
1089
-
1090
- this.foldingStartMarker = null;
1091
- this.foldingStopMarker = null;
1092
-
1093
- // must return "" if there's no fold, to enable caching
1094
- this.getFoldWidget = function(session, foldStyle, row) {
1095
- var line = session.getLine(row);
1096
- if (this.foldingStartMarker.test(line))
1097
- return "start";
1098
- if (foldStyle == "markbeginend"
1099
- && this.foldingStopMarker
1100
- && this.foldingStopMarker.test(line))
1101
- return "end";
1102
- return "";
1103
- };
1104
-
1105
- this.getFoldWidgetRange = function(session, foldStyle, row) {
1106
- return null;
1107
- };
1108
-
1109
- this.indentationBlock = function(session, row, column) {
1110
- var re = /^\s*/;
1111
- var startRow = row;
1112
- var endRow = row;
1113
- var line = session.getLine(row);
1114
- var startColumn = column || line.length;
1115
- var startLevel = line.match(re)[0].length;
1116
- var maxRow = session.getLength()
1117
-
1118
- while (++row < maxRow) {
1119
- line = session.getLine(row);
1120
- var level = line.match(re)[0].length;
1121
-
1122
- if (level == line.length)
1123
- continue;
1124
-
1125
- if (level <= startLevel)
1126
- break;
1127
-
1128
- endRow = row;
1129
- }
1130
-
1131
- if (endRow > startRow) {
1132
- var endColumn = session.getLine(endRow).length;
1133
- return new Range(startRow, startColumn, endRow, endColumn);
1134
- }
1135
- };
1136
-
1137
- this.openingBracketBlock = function(session, bracket, row, column) {
1138
- var start = {row: row, column: column + 1};
1139
- var end = session.$findClosingBracket(bracket, start);
1140
- if (!end)
1141
- return;
1142
-
1143
- var fw = session.foldWidgets[end.row];
1144
- if (fw == null)
1145
- fw = this.getFoldWidget(session, end.row);
1146
-
1147
- if (fw == "start") {
1148
- end.row --;
1149
- end.column = session.getLine(end.row).length;
1150
- }
1151
- return Range.fromPoints(start, end);
1152
- };
1153
-
1154
- }).call(FoldMode.prototype);
1155
-
1156
- });
1157
- ace.define('ace/mode/java_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1158
- "use strict";
1159
-
1160
- var oop = require("../lib/oop");
1161
- var lang = require("../lib/lang");
1162
- var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
1163
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1164
-
1165
- var JavaHighlightRules = function() {
1166
-
1167
- // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
1168
- var keywords = lang.arrayToMap(
1169
- ("abstract|continue|for|new|switch|" +
1170
- "assert|default|goto|package|synchronized|" +
1171
- "boolean|do|if|private|this|" +
1172
- "break|double|implements|protected|throw|" +
1173
- "byte|else|import|public|throws|" +
1174
- "case|enum|instanceof|return|transient|" +
1175
- "catch|extends|int|short|try|" +
1176
- "char|final|interface|static|void|" +
1177
- "class|finally|long|strictfp|volatile|" +
1178
- "const|float|native|super|while").split("|")
1179
- );
1180
-
1181
- var buildinConstants = lang.arrayToMap(
1182
- ("null|Infinity|NaN|undefined").split("|")
1183
- );
1184
-
1185
- var langClasses = lang.arrayToMap(
1186
- ("AbstractMethodError|AssertionError|ClassCircularityError|"+
1187
- "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
1188
- "ExceptionInInitializerError|IllegalAccessError|"+
1189
- "IllegalThreadStateException|InstantiationError|InternalError|"+
1190
- "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
1191
- "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
1192
- "SuppressWarnings|TypeNotPresentException|UnknownError|"+
1193
- "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
1194
- "InstantiationException|IndexOutOfBoundsException|"+
1195
- "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
1196
- "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
1197
- "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
1198
- "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
1199
- "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
1200
- "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
1201
- "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
1202
- "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
1203
- "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
1204
- "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
1205
- "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
1206
- "ArrayStoreException|ClassCastException|LinkageError|"+
1207
- "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
1208
- "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
1209
- "Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
1210
- );
1211
-
1212
- var importClasses = lang.arrayToMap(
1213
- ("").split("|")
1214
- );
1215
- // regexp must not have capturing parentheses. Use (?:) instead.
1216
- // regexps are ordered -> the first match is used
1217
-
1218
- this.$rules = {
1219
- "start" : [
1220
- {
1221
- token : "comment",
1222
- regex : "\\/\\/.*$"
1223
- },
1224
- new DocCommentHighlightRules().getStartRule("doc-start"),
1225
- {
1226
- token : "comment", // multi line comment
1227
- merge : true,
1228
- regex : "\\/\\*",
1229
- next : "comment"
1230
- }, {
1231
- token : "string.regexp",
1232
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
1233
- }, {
1234
- token : "string", // single line
1235
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1236
- }, {
1237
- token : "string", // single line
1238
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1239
- }, {
1240
- token : "constant.numeric", // hex
1241
- regex : "0[xX][0-9a-fA-F]+\\b"
1242
- }, {
1243
- token : "constant.numeric", // float
1244
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1245
- }, {
1246
- token : "constant.language.boolean",
1247
- regex : "(?:true|false)\\b"
1248
- }, {
1249
- token : function(value) {
1250
- if (value == "this")
1251
- return "variable.language";
1252
- else if (keywords.hasOwnProperty(value))
1253
- return "keyword";
1254
- else if (langClasses.hasOwnProperty(value))
1255
- return "support.function";
1256
- else if (importClasses.hasOwnProperty(value))
1257
- return "support.function";
1258
- else if (buildinConstants.hasOwnProperty(value))
1259
- return "constant.language";
1260
- else
1261
- return "identifier";
1262
- },
1263
- // TODO: Unicode escape sequences
1264
- // TODO: Unicode identifiers
1265
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
1266
- }, {
1267
- token : "keyword.operator",
1268
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
1269
- }, {
1270
- token : "lparen",
1271
- regex : "[[({]"
1272
- }, {
1273
- token : "rparen",
1274
- regex : "[\\])}]"
1275
- }, {
1276
- token : "text",
1277
- regex : "\\s+"
1278
- }
1279
- ],
1280
- "comment" : [
1281
- {
1282
- token : "comment", // closing comment
1283
- regex : ".*?\\*\\/",
1284
- next : "start"
1285
- }, {
1286
- token : "comment", // comment spanning whole line
1287
- merge : true,
1288
- regex : ".+"
1289
- }
1290
- ]
1291
- };
1292
-
1293
- this.embedRules(DocCommentHighlightRules, "doc-",
1294
- [ new DocCommentHighlightRules().getEndRule("start") ]);
1295
- };
1296
-
1297
- oop.inherits(JavaHighlightRules, TextHighlightRules);
1298
-
1299
- exports.JavaHighlightRules = JavaHighlightRules;
1300
- });