ace-oqc 1.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -0
- package/src-noconflict/ace.js +21402 -0
- package/src-noconflict/ext-beautify.js +331 -0
- package/src-noconflict/ext-elastic_tabstops_lite.js +277 -0
- package/src-noconflict/ext-emmet.js +1331 -0
- package/src-noconflict/ext-error_marker.js +9 -0
- package/src-noconflict/ext-keybinding_menu.js +193 -0
- package/src-noconflict/ext-language_tools.js +2166 -0
- package/src-noconflict/ext-linking.js +64 -0
- package/src-noconflict/ext-modelist.js +248 -0
- package/src-noconflict/ext-options.js +799 -0
- package/src-noconflict/ext-prompt.js +2806 -0
- package/src-noconflict/ext-rtl.js +122 -0
- package/src-noconflict/ext-searchbox.js +514 -0
- package/src-noconflict/ext-settings_menu.js +820 -0
- package/src-noconflict/ext-spellcheck.js +73 -0
- package/src-noconflict/ext-split.js +207 -0
- package/src-noconflict/ext-static_highlight.js +229 -0
- package/src-noconflict/ext-statusbar.js +56 -0
- package/src-noconflict/ext-textarea.js +430 -0
- package/src-noconflict/ext-themelist.js +67 -0
- package/src-noconflict/ext-whitespace.js +213 -0
- package/src-noconflict/keybinding-emacs.js +1169 -0
- package/src-noconflict/keybinding-sublime.js +422 -0
- package/src-noconflict/keybinding-vim.js +6198 -0
- package/src-noconflict/mode-abap.js +221 -0
- package/src-noconflict/mode-abc.js +271 -0
- package/src-noconflict/mode-actionscript.js +275 -0
- package/src-noconflict/mode-ada.js +137 -0
- package/src-noconflict/mode-apache_conf.js +363 -0
- package/src-noconflict/mode-apex.js +457 -0
- package/src-noconflict/mode-applescript.js +278 -0
- package/src-noconflict/mode-aql.js +102 -0
- package/src-noconflict/mode-asciidoc.js +349 -0
- package/src-noconflict/mode-asl.js +422 -0
- package/src-noconflict/mode-assembly_x86.js +193 -0
- package/src-noconflict/mode-autohotkey.js +244 -0
- package/src-noconflict/mode-batchfile.js +230 -0
- package/src-noconflict/mode-c9search.js +293 -0
- package/src-noconflict/mode-c_cpp.js +503 -0
- package/src-noconflict/mode-cirru.js +210 -0
- package/src-noconflict/mode-clojure.js +315 -0
- package/src-noconflict/mode-cobol.js +101 -0
- package/src-noconflict/mode-coffee.js +400 -0
- package/src-noconflict/mode-coldfusion.js +2596 -0
- package/src-noconflict/mode-crystal.js +642 -0
- package/src-noconflict/mode-csharp.js +502 -0
- package/src-noconflict/mode-csound_document.js +4105 -0
- package/src-noconflict/mode-csound_orchestra.js +3035 -0
- package/src-noconflict/mode-csound_score.js +462 -0
- package/src-noconflict/mode-csp.js +59 -0
- package/src-noconflict/mode-css.js +720 -0
- package/src-noconflict/mode-curly.js +2564 -0
- package/src-noconflict/mode-d.js +520 -0
- package/src-noconflict/mode-dart.js +715 -0
- package/src-noconflict/mode-diff.js +147 -0
- package/src-noconflict/mode-django.js +2595 -0
- package/src-noconflict/mode-dockerfile.js +500 -0
- package/src-noconflict/mode-dot.js +417 -0
- package/src-noconflict/mode-drools.js +498 -0
- package/src-noconflict/mode-edifact.js +166 -0
- package/src-noconflict/mode-eiffel.js +135 -0
- package/src-noconflict/mode-ejs.js +3533 -0
- package/src-noconflict/mode-elixir.js +501 -0
- package/src-noconflict/mode-elm.js +306 -0
- package/src-noconflict/mode-erlang.js +1010 -0
- package/src-noconflict/mode-forth.js +297 -0
- package/src-noconflict/mode-fortran.js +430 -0
- package/src-noconflict/mode-fsharp.js +316 -0
- package/src-noconflict/mode-fsl.js +259 -0
- package/src-noconflict/mode-ftl.js +1193 -0
- package/src-noconflict/mode-gcode.js +93 -0
- package/src-noconflict/mode-gherkin.js +168 -0
- package/src-noconflict/mode-gitignore.js +59 -0
- package/src-noconflict/mode-glsl.js +580 -0
- package/src-noconflict/mode-gobstones.js +1090 -0
- package/src-noconflict/mode-golang.js +413 -0
- package/src-noconflict/mode-graphqlschema.js +214 -0
- package/src-noconflict/mode-groovy.js +989 -0
- package/src-noconflict/mode-haml.js +1873 -0
- package/src-noconflict/mode-handlebars.js +2622 -0
- package/src-noconflict/mode-haskell.js +380 -0
- package/src-noconflict/mode-haskell_cabal.js +141 -0
- package/src-noconflict/mode-haxe.js +386 -0
- package/src-noconflict/mode-hjson.js +353 -0
- package/src-noconflict/mode-html.js +2509 -0
- package/src-noconflict/mode-html_elixir.js +3088 -0
- package/src-noconflict/mode-html_ruby.js +3550 -0
- package/src-noconflict/mode-ini.js +162 -0
- package/src-noconflict/mode-io.js +248 -0
- package/src-noconflict/mode-jack.js +346 -0
- package/src-noconflict/mode-jade.js +2025 -0
- package/src-noconflict/mode-java.js +1038 -0
- package/src-noconflict/mode-javascript.js +798 -0
- package/src-noconflict/mode-json.js +329 -0
- package/src-noconflict/mode-jsoniq.js +2632 -0
- package/src-noconflict/mode-jsp.js +1433 -0
- package/src-noconflict/mode-jssm.js +325 -0
- package/src-noconflict/mode-jsx.js +411 -0
- package/src-noconflict/mode-julia.js +303 -0
- package/src-noconflict/mode-kotlin.js +797 -0
- package/src-noconflict/mode-latex.js +296 -0
- package/src-noconflict/mode-less.js +839 -0
- package/src-noconflict/mode-liquid.js +2742 -0
- package/src-noconflict/mode-lisp.js +112 -0
- package/src-noconflict/mode-livescript.js +279 -0
- package/src-noconflict/mode-logiql.js +317 -0
- package/src-noconflict/mode-logtalk.js +352 -0
- package/src-noconflict/mode-lsl.js +343 -0
- package/src-noconflict/mode-lua.js +452 -0
- package/src-noconflict/mode-luapage.js +3028 -0
- package/src-noconflict/mode-lucene.js +154 -0
- package/src-noconflict/mode-makefile.js +412 -0
- package/src-noconflict/mode-markdown.js +3194 -0
- package/src-noconflict/mode-mask.js +1803 -0
- package/src-noconflict/mode-matlab.js +263 -0
- package/src-noconflict/mode-maze.js +292 -0
- package/src-noconflict/mode-mel.js +263 -0
- package/src-noconflict/mode-mixal.js +122 -0
- package/src-noconflict/mode-mushcode.js +681 -0
- package/src-noconflict/mode-mysql.js +167 -0
- package/src-noconflict/mode-nginx.js +298 -0
- package/src-noconflict/mode-nim.js +363 -0
- package/src-noconflict/mode-nix.js +647 -0
- package/src-noconflict/mode-nsis.js +312 -0
- package/src-noconflict/mode-objectivec.js +740 -0
- package/src-noconflict/mode-ocaml.js +421 -0
- package/src-noconflict/mode-pascal.js +223 -0
- package/src-noconflict/mode-perl.js +381 -0
- package/src-noconflict/mode-pgsql.js +1743 -0
- package/src-noconflict/mode-php.js +13110 -0
- package/src-noconflict/mode-php_laravel_blade.js +13311 -0
- package/src-noconflict/mode-pig.js +310 -0
- package/src-noconflict/mode-plain_text.js +32 -0
- package/src-noconflict/mode-powershell.js +418 -0
- package/src-noconflict/mode-praat.js +478 -0
- package/src-noconflict/mode-prolog.js +371 -0
- package/src-noconflict/mode-properties.js +80 -0
- package/src-noconflict/mode-protobuf.js +593 -0
- package/src-noconflict/mode-puppet.js +368 -0
- package/src-noconflict/mode-python.js +508 -0
- package/src-noconflict/mode-r.js +312 -0
- package/src-noconflict/mode-razor.js +2875 -0
- package/src-noconflict/mode-rdoc.js +243 -0
- package/src-noconflict/mode-red.js +450 -0
- package/src-noconflict/mode-redshift.js +360 -0
- package/src-noconflict/mode-rhtml.js +2808 -0
- package/src-noconflict/mode-rst.js +257 -0
- package/src-noconflict/mode-ruby.js +1003 -0
- package/src-noconflict/mode-rust.js +282 -0
- package/src-noconflict/mode-sass.js +529 -0
- package/src-noconflict/mode-scad.js +414 -0
- package/src-noconflict/mode-scala.js +984 -0
- package/src-noconflict/mode-scheme.js +232 -0
- package/src-noconflict/mode-scss.js +873 -0
- package/src-noconflict/mode-sh.js +449 -0
- package/src-noconflict/mode-sjs.js +1015 -0
- package/src-noconflict/mode-slim.js +5240 -0
- package/src-noconflict/mode-smarty.js +2635 -0
- package/src-noconflict/mode-snippets.js +207 -0
- package/src-noconflict/mode-soy_template.js +2848 -0
- package/src-noconflict/mode-space.js +167 -0
- package/src-noconflict/mode-sparql.js +320 -0
- package/src-noconflict/mode-sql.js +271 -0
- package/src-noconflict/mode-sqlserver.js +445 -0
- package/src-noconflict/mode-stylus.js +472 -0
- package/src-noconflict/mode-svg.js +1582 -0
- package/src-noconflict/mode-swift.js +395 -0
- package/src-noconflict/mode-tcl.js +387 -0
- package/src-noconflict/mode-terraform.js +400 -0
- package/src-noconflict/mode-tex.js +160 -0
- package/src-noconflict/mode-text.js +9 -0
- package/src-noconflict/mode-textile.js +150 -0
- package/src-noconflict/mode-toml.js +153 -0
- package/src-noconflict/mode-tsx.js +888 -0
- package/src-noconflict/mode-turtle.js +296 -0
- package/src-noconflict/mode-twig.js +2693 -0
- package/src-noconflict/mode-typescript.js +869 -0
- package/src-noconflict/mode-vala.js +677 -0
- package/src-noconflict/mode-vbscript.js +635 -0
- package/src-noconflict/mode-velocity.js +2792 -0
- package/src-noconflict/mode-verilog.js +118 -0
- package/src-noconflict/mode-vhdl.js +116 -0
- package/src-noconflict/mode-visualforce.js +2640 -0
- package/src-noconflict/mode-wollok.js +914 -0
- package/src-noconflict/mode-xml.js +676 -0
- package/src-noconflict/mode-xquery.js +2644 -0
- package/src-noconflict/mode-yaml.js +330 -0
- package/src-noconflict/mode-zeek.js +539 -0
- package/src-noconflict/qurator-mode.js +120 -0
- package/src-noconflict/qurator-worker.js +91 -0
- package/src-noconflict/snippets/abap.js +9 -0
- package/src-noconflict/snippets/abc.js +45 -0
- package/src-noconflict/snippets/actionscript.js +171 -0
- package/src-noconflict/snippets/ada.js +9 -0
- package/src-noconflict/snippets/apache_conf.js +9 -0
- package/src-noconflict/snippets/apex.js +9 -0
- package/src-noconflict/snippets/applescript.js +9 -0
- package/src-noconflict/snippets/aql.js +9 -0
- package/src-noconflict/snippets/asciidoc.js +9 -0
- package/src-noconflict/snippets/asl.js +9 -0
- package/src-noconflict/snippets/assembly_x86.js +9 -0
- package/src-noconflict/snippets/autohotkey.js +9 -0
- package/src-noconflict/snippets/batchfile.js +9 -0
- package/src-noconflict/snippets/c9search.js +9 -0
- package/src-noconflict/snippets/c_cpp.js +145 -0
- package/src-noconflict/snippets/cirru.js +9 -0
- package/src-noconflict/snippets/clojure.js +104 -0
- package/src-noconflict/snippets/cobol.js +9 -0
- package/src-noconflict/snippets/coffee.js +109 -0
- package/src-noconflict/snippets/coldfusion.js +9 -0
- package/src-noconflict/snippets/crystal.js +9 -0
- package/src-noconflict/snippets/csharp.js +9 -0
- package/src-noconflict/snippets/csound_document.js +24 -0
- package/src-noconflict/snippets/csound_orchestra.js +61 -0
- package/src-noconflict/snippets/csound_score.js +9 -0
- package/src-noconflict/snippets/csp.js +9 -0
- package/src-noconflict/snippets/css.js +981 -0
- package/src-noconflict/snippets/curly.js +9 -0
- package/src-noconflict/snippets/d.js +9 -0
- package/src-noconflict/snippets/dart.js +97 -0
- package/src-noconflict/snippets/diff.js +25 -0
- package/src-noconflict/snippets/django.js +122 -0
- package/src-noconflict/snippets/dockerfile.js +9 -0
- package/src-noconflict/snippets/dot.js +9 -0
- package/src-noconflict/snippets/drools.js +33 -0
- package/src-noconflict/snippets/edifact.js +254 -0
- package/src-noconflict/snippets/eiffel.js +9 -0
- package/src-noconflict/snippets/ejs.js +9 -0
- package/src-noconflict/snippets/elixir.js +9 -0
- package/src-noconflict/snippets/elm.js +9 -0
- package/src-noconflict/snippets/erlang.js +174 -0
- package/src-noconflict/snippets/forth.js +9 -0
- package/src-noconflict/snippets/fortran.js +9 -0
- package/src-noconflict/snippets/fsharp.js +9 -0
- package/src-noconflict/snippets/fsl.js +14 -0
- package/src-noconflict/snippets/ftl.js +9 -0
- package/src-noconflict/snippets/gcode.js +9 -0
- package/src-noconflict/snippets/gherkin.js +9 -0
- package/src-noconflict/snippets/gitignore.js +9 -0
- package/src-noconflict/snippets/glsl.js +9 -0
- package/src-noconflict/snippets/gobstones.js +1718 -0
- package/src-noconflict/snippets/golang.js +9 -0
- package/src-noconflict/snippets/graphqlschema.js +46 -0
- package/src-noconflict/snippets/groovy.js +9 -0
- package/src-noconflict/snippets/haml.js +34 -0
- package/src-noconflict/snippets/handlebars.js +9 -0
- package/src-noconflict/snippets/haskell.js +96 -0
- package/src-noconflict/snippets/haskell_cabal.js +9 -0
- package/src-noconflict/snippets/haxe.js +9 -0
- package/src-noconflict/snippets/hjson.js +9 -0
- package/src-noconflict/snippets/html.js +867 -0
- package/src-noconflict/snippets/html_elixir.js +9 -0
- package/src-noconflict/snippets/html_ruby.js +9 -0
- package/src-noconflict/snippets/ini.js +9 -0
- package/src-noconflict/snippets/io.js +76 -0
- package/src-noconflict/snippets/jack.js +9 -0
- package/src-noconflict/snippets/jade.js +9 -0
- package/src-noconflict/snippets/java.js +254 -0
- package/src-noconflict/snippets/javascript.js +209 -0
- package/src-noconflict/snippets/json.js +9 -0
- package/src-noconflict/snippets/jsoniq.js +75 -0
- package/src-noconflict/snippets/jsp.js +113 -0
- package/src-noconflict/snippets/jssm.js +9 -0
- package/src-noconflict/snippets/jsx.js +9 -0
- package/src-noconflict/snippets/julia.js +9 -0
- package/src-noconflict/snippets/kotlin.js +9 -0
- package/src-noconflict/snippets/latex.js +9 -0
- package/src-noconflict/snippets/less.js +9 -0
- package/src-noconflict/snippets/liquid.js +895 -0
- package/src-noconflict/snippets/lisp.js +9 -0
- package/src-noconflict/snippets/livescript.js +9 -0
- package/src-noconflict/snippets/logiql.js +9 -0
- package/src-noconflict/snippets/logtalk.js +9 -0
- package/src-noconflict/snippets/lsl.js +1246 -0
- package/src-noconflict/snippets/lua.js +35 -0
- package/src-noconflict/snippets/luapage.js +9 -0
- package/src-noconflict/snippets/lucene.js +9 -0
- package/src-noconflict/snippets/makefile.js +18 -0
- package/src-noconflict/snippets/markdown.js +102 -0
- package/src-noconflict/snippets/mask.js +9 -0
- package/src-noconflict/snippets/matlab.js +9 -0
- package/src-noconflict/snippets/maze.js +23 -0
- package/src-noconflict/snippets/mel.js +9 -0
- package/src-noconflict/snippets/mixal.js +9 -0
- package/src-noconflict/snippets/mushcode.js +9 -0
- package/src-noconflict/snippets/mysql.js +9 -0
- package/src-noconflict/snippets/nginx.js +9 -0
- package/src-noconflict/snippets/nim.js +9 -0
- package/src-noconflict/snippets/nix.js +9 -0
- package/src-noconflict/snippets/nsis.js +9 -0
- package/src-noconflict/snippets/objectivec.js +9 -0
- package/src-noconflict/snippets/ocaml.js +9 -0
- package/src-noconflict/snippets/pascal.js +9 -0
- package/src-noconflict/snippets/perl.js +361 -0
- package/src-noconflict/snippets/pgsql.js +9 -0
- package/src-noconflict/snippets/php.js +397 -0
- package/src-noconflict/snippets/php_laravel_blade.js +9 -0
- package/src-noconflict/snippets/pig.js +9 -0
- package/src-noconflict/snippets/plain_text.js +9 -0
- package/src-noconflict/snippets/powershell.js +9 -0
- package/src-noconflict/snippets/praat.js +9 -0
- package/src-noconflict/snippets/prolog.js +9 -0
- package/src-noconflict/snippets/properties.js +9 -0
- package/src-noconflict/snippets/protobuf.js +9 -0
- package/src-noconflict/snippets/puppet.js +9 -0
- package/src-noconflict/snippets/python.js +172 -0
- package/src-noconflict/snippets/r.js +135 -0
- package/src-noconflict/snippets/razor.js +17 -0
- package/src-noconflict/snippets/rdoc.js +9 -0
- package/src-noconflict/snippets/red.js +9 -0
- package/src-noconflict/snippets/redshift.js +9 -0
- package/src-noconflict/snippets/rhtml.js +9 -0
- package/src-noconflict/snippets/rst.js +36 -0
- package/src-noconflict/snippets/ruby.js +942 -0
- package/src-noconflict/snippets/rust.js +9 -0
- package/src-noconflict/snippets/sass.js +9 -0
- package/src-noconflict/snippets/scad.js +9 -0
- package/src-noconflict/snippets/scala.js +9 -0
- package/src-noconflict/snippets/scheme.js +9 -0
- package/src-noconflict/snippets/scss.js +9 -0
- package/src-noconflict/snippets/sh.js +97 -0
- package/src-noconflict/snippets/sjs.js +9 -0
- package/src-noconflict/snippets/slim.js +9 -0
- package/src-noconflict/snippets/smarty.js +9 -0
- package/src-noconflict/snippets/snippets.js +23 -0
- package/src-noconflict/snippets/soy_template.js +9 -0
- package/src-noconflict/snippets/space.js +9 -0
- package/src-noconflict/snippets/sparql.js +9 -0
- package/src-noconflict/snippets/sql.js +40 -0
- package/src-noconflict/snippets/sqlserver.js +83 -0
- package/src-noconflict/snippets/stylus.js +9 -0
- package/src-noconflict/snippets/svg.js +9 -0
- package/src-noconflict/snippets/swift.js +9 -0
- package/src-noconflict/snippets/tcl.js +106 -0
- package/src-noconflict/snippets/terraform.js +9 -0
- package/src-noconflict/snippets/tex.js +204 -0
- package/src-noconflict/snippets/text.js +9 -0
- package/src-noconflict/snippets/textile.js +44 -0
- package/src-noconflict/snippets/toml.js +9 -0
- package/src-noconflict/snippets/tsx.js +9 -0
- package/src-noconflict/snippets/turtle.js +9 -0
- package/src-noconflict/snippets/twig.js +9 -0
- package/src-noconflict/snippets/typescript.js +9 -0
- package/src-noconflict/snippets/vala.js +200 -0
- package/src-noconflict/snippets/vbscript.js +9 -0
- package/src-noconflict/snippets/velocity.js +43 -0
- package/src-noconflict/snippets/verilog.js +9 -0
- package/src-noconflict/snippets/vhdl.js +9 -0
- package/src-noconflict/snippets/visualforce.js +9 -0
- package/src-noconflict/snippets/wollok.js +98 -0
- package/src-noconflict/snippets/xml.js +9 -0
- package/src-noconflict/snippets/xquery.js +75 -0
- package/src-noconflict/snippets/yaml.js +9 -0
- package/src-noconflict/snippets/zeek.js +9 -0
- package/src-noconflict/theme-ambiance.js +185 -0
- package/src-noconflict/theme-chaos.js +163 -0
- package/src-noconflict/theme-chrome.js +135 -0
- package/src-noconflict/theme-clouds.js +102 -0
- package/src-noconflict/theme-clouds_midnight.js +103 -0
- package/src-noconflict/theme-cobalt.js +120 -0
- package/src-noconflict/theme-crimson_editor.js +125 -0
- package/src-noconflict/theme-dawn.js +115 -0
- package/src-noconflict/theme-dracula.js +135 -0
- package/src-noconflict/theme-dreamweaver.js +148 -0
- package/src-noconflict/theme-eclipse.js +105 -0
- package/src-noconflict/theme-github.js +110 -0
- package/src-noconflict/theme-gob.js +119 -0
- package/src-noconflict/theme-gruvbox.js +89 -0
- package/src-noconflict/theme-idle_fingers.js +103 -0
- package/src-noconflict/theme-iplastic.js +128 -0
- package/src-noconflict/theme-katzenmilch.js +128 -0
- package/src-noconflict/theme-kr_theme.js +111 -0
- package/src-noconflict/theme-kuroir.js +68 -0
- package/src-noconflict/theme-merbivore.js +102 -0
- package/src-noconflict/theme-merbivore_soft.js +103 -0
- package/src-noconflict/theme-mono_industrial.js +114 -0
- package/src-noconflict/theme-monokai.js +112 -0
- package/src-noconflict/theme-pastel_on_dark.js +115 -0
- package/src-noconflict/theme-solarized_dark.js +95 -0
- package/src-noconflict/theme-solarized_light.js +98 -0
- package/src-noconflict/theme-sqlserver.js +145 -0
- package/src-noconflict/theme-terminal.js +121 -0
- package/src-noconflict/theme-textmate.js +137 -0
- package/src-noconflict/theme-tomorrow.js +115 -0
- package/src-noconflict/theme-tomorrow_night.js +115 -0
- package/src-noconflict/theme-tomorrow_night_blue.js +113 -0
- package/src-noconflict/theme-tomorrow_night_bright.js +128 -0
- package/src-noconflict/theme-tomorrow_night_eighties.js +115 -0
- package/src-noconflict/theme-twilight.js +116 -0
- package/src-noconflict/theme-vibrant_ink.js +101 -0
- package/src-noconflict/theme-xcode.js +95 -0
- package/src-noconflict/worker-coffee.js +1470 -0
- package/src-noconflict/worker-css.js +9000 -0
- package/src-noconflict/worker-html.js +10922 -0
- package/src-noconflict/worker-javascript.js +15001 -0
- package/src-noconflict/worker-json.js +1715 -0
- package/src-noconflict/worker-lua.js +3608 -0
- package/src-noconflict/worker-php.js +3687 -0
- package/src-noconflict/worker-xml.js +3208 -0
- package/src-noconflict/worker-xquery.js +57668 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) {
|
|
2
|
+
"use strict";
|
|
3
|
+
var event = require("../lib/event");
|
|
4
|
+
|
|
5
|
+
exports.contextMenuHandler = function(e){
|
|
6
|
+
var host = e.target;
|
|
7
|
+
var text = host.textInput.getElement();
|
|
8
|
+
if (!host.selection.isEmpty())
|
|
9
|
+
return;
|
|
10
|
+
var c = host.getCursorPosition();
|
|
11
|
+
var r = host.session.getWordRange(c.row, c.column);
|
|
12
|
+
var w = host.session.getTextRange(r);
|
|
13
|
+
|
|
14
|
+
host.session.tokenRe.lastIndex = 0;
|
|
15
|
+
if (!host.session.tokenRe.test(w))
|
|
16
|
+
return;
|
|
17
|
+
var PLACEHOLDER = "\x01\x01";
|
|
18
|
+
var value = w + " " + PLACEHOLDER;
|
|
19
|
+
text.value = value;
|
|
20
|
+
text.setSelectionRange(w.length, w.length + 1);
|
|
21
|
+
text.setSelectionRange(0, 0);
|
|
22
|
+
text.setSelectionRange(0, w.length);
|
|
23
|
+
|
|
24
|
+
var afterKeydown = false;
|
|
25
|
+
event.addListener(text, "keydown", function onKeydown() {
|
|
26
|
+
event.removeListener(text, "keydown", onKeydown);
|
|
27
|
+
afterKeydown = true;
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
host.textInput.setInputHandler(function(newVal) {
|
|
31
|
+
if (newVal == value)
|
|
32
|
+
return '';
|
|
33
|
+
if (newVal.lastIndexOf(value, 0) === 0)
|
|
34
|
+
return newVal.slice(value.length);
|
|
35
|
+
if (newVal.substr(text.selectionEnd) == value)
|
|
36
|
+
return newVal.slice(0, -value.length);
|
|
37
|
+
if (newVal.slice(-2) == PLACEHOLDER) {
|
|
38
|
+
var val = newVal.slice(0, -2);
|
|
39
|
+
if (val.slice(-1) == " ") {
|
|
40
|
+
if (afterKeydown)
|
|
41
|
+
return val.substring(0, text.selectionEnd);
|
|
42
|
+
val = val.slice(0, -1);
|
|
43
|
+
host.session.replace(r, val);
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return newVal;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var Editor = require("../editor").Editor;
|
|
52
|
+
require("../config").defineOptions(Editor.prototype, "editor", {
|
|
53
|
+
spellcheck: {
|
|
54
|
+
set: function(val) {
|
|
55
|
+
var text = this.textInput.getElement();
|
|
56
|
+
text.spellcheck = !!val;
|
|
57
|
+
if (!val)
|
|
58
|
+
this.removeListener("nativecontextmenu", exports.contextMenuHandler);
|
|
59
|
+
else
|
|
60
|
+
this.on("nativecontextmenu", exports.contextMenuHandler);
|
|
61
|
+
},
|
|
62
|
+
value: true
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
}); (function() {
|
|
67
|
+
ace.require(["ace/ext/spellcheck"], function(m) {
|
|
68
|
+
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
69
|
+
module.exports = m;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
})();
|
|
73
|
+
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module) {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var oop = require("./lib/oop");
|
|
5
|
+
var lang = require("./lib/lang");
|
|
6
|
+
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
|
7
|
+
|
|
8
|
+
var Editor = require("./editor").Editor;
|
|
9
|
+
var Renderer = require("./virtual_renderer").VirtualRenderer;
|
|
10
|
+
var EditSession = require("./edit_session").EditSession;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var Split = function(container, theme, splits) {
|
|
14
|
+
this.BELOW = 1;
|
|
15
|
+
this.BESIDE = 0;
|
|
16
|
+
|
|
17
|
+
this.$container = container;
|
|
18
|
+
this.$theme = theme;
|
|
19
|
+
this.$splits = 0;
|
|
20
|
+
this.$editorCSS = "";
|
|
21
|
+
this.$editors = [];
|
|
22
|
+
this.$orientation = this.BESIDE;
|
|
23
|
+
|
|
24
|
+
this.setSplits(splits || 1);
|
|
25
|
+
this.$cEditor = this.$editors[0];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
this.on("focus", function(editor) {
|
|
29
|
+
this.$cEditor = editor;
|
|
30
|
+
}.bind(this));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
(function(){
|
|
34
|
+
|
|
35
|
+
oop.implement(this, EventEmitter);
|
|
36
|
+
|
|
37
|
+
this.$createEditor = function() {
|
|
38
|
+
var el = document.createElement("div");
|
|
39
|
+
el.className = this.$editorCSS;
|
|
40
|
+
el.style.cssText = "position: absolute; top:0px; bottom:0px";
|
|
41
|
+
this.$container.appendChild(el);
|
|
42
|
+
var editor = new Editor(new Renderer(el, this.$theme));
|
|
43
|
+
|
|
44
|
+
editor.on("focus", function() {
|
|
45
|
+
this._emit("focus", editor);
|
|
46
|
+
}.bind(this));
|
|
47
|
+
|
|
48
|
+
this.$editors.push(editor);
|
|
49
|
+
editor.setFontSize(this.$fontSize);
|
|
50
|
+
return editor;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
this.setSplits = function(splits) {
|
|
54
|
+
var editor;
|
|
55
|
+
if (splits < 1) {
|
|
56
|
+
throw "The number of splits have to be > 0!";
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (splits == this.$splits) {
|
|
60
|
+
return;
|
|
61
|
+
} else if (splits > this.$splits) {
|
|
62
|
+
while (this.$splits < this.$editors.length && this.$splits < splits) {
|
|
63
|
+
editor = this.$editors[this.$splits];
|
|
64
|
+
this.$container.appendChild(editor.container);
|
|
65
|
+
editor.setFontSize(this.$fontSize);
|
|
66
|
+
this.$splits ++;
|
|
67
|
+
}
|
|
68
|
+
while (this.$splits < splits) {
|
|
69
|
+
this.$createEditor();
|
|
70
|
+
this.$splits ++;
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
while (this.$splits > splits) {
|
|
74
|
+
editor = this.$editors[this.$splits - 1];
|
|
75
|
+
this.$container.removeChild(editor.container);
|
|
76
|
+
this.$splits --;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
this.resize();
|
|
80
|
+
};
|
|
81
|
+
this.getSplits = function() {
|
|
82
|
+
return this.$splits;
|
|
83
|
+
};
|
|
84
|
+
this.getEditor = function(idx) {
|
|
85
|
+
return this.$editors[idx];
|
|
86
|
+
};
|
|
87
|
+
this.getCurrentEditor = function() {
|
|
88
|
+
return this.$cEditor;
|
|
89
|
+
};
|
|
90
|
+
this.focus = function() {
|
|
91
|
+
this.$cEditor.focus();
|
|
92
|
+
};
|
|
93
|
+
this.blur = function() {
|
|
94
|
+
this.$cEditor.blur();
|
|
95
|
+
};
|
|
96
|
+
this.setTheme = function(theme) {
|
|
97
|
+
this.$editors.forEach(function(editor) {
|
|
98
|
+
editor.setTheme(theme);
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
this.setKeyboardHandler = function(keybinding) {
|
|
102
|
+
this.$editors.forEach(function(editor) {
|
|
103
|
+
editor.setKeyboardHandler(keybinding);
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
this.forEach = function(callback, scope) {
|
|
107
|
+
this.$editors.forEach(callback, scope);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
this.$fontSize = "";
|
|
112
|
+
this.setFontSize = function(size) {
|
|
113
|
+
this.$fontSize = size;
|
|
114
|
+
this.forEach(function(editor) {
|
|
115
|
+
editor.setFontSize(size);
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
this.$cloneSession = function(session) {
|
|
120
|
+
var s = new EditSession(session.getDocument(), session.getMode());
|
|
121
|
+
|
|
122
|
+
var undoManager = session.getUndoManager();
|
|
123
|
+
s.setUndoManager(undoManager);
|
|
124
|
+
s.setTabSize(session.getTabSize());
|
|
125
|
+
s.setUseSoftTabs(session.getUseSoftTabs());
|
|
126
|
+
s.setOverwrite(session.getOverwrite());
|
|
127
|
+
s.setBreakpoints(session.getBreakpoints());
|
|
128
|
+
s.setUseWrapMode(session.getUseWrapMode());
|
|
129
|
+
s.setUseWorker(session.getUseWorker());
|
|
130
|
+
s.setWrapLimitRange(session.$wrapLimitRange.min,
|
|
131
|
+
session.$wrapLimitRange.max);
|
|
132
|
+
s.$foldData = session.$cloneFoldData();
|
|
133
|
+
|
|
134
|
+
return s;
|
|
135
|
+
};
|
|
136
|
+
this.setSession = function(session, idx) {
|
|
137
|
+
var editor;
|
|
138
|
+
if (idx == null) {
|
|
139
|
+
editor = this.$cEditor;
|
|
140
|
+
} else {
|
|
141
|
+
editor = this.$editors[idx];
|
|
142
|
+
}
|
|
143
|
+
var isUsed = this.$editors.some(function(editor) {
|
|
144
|
+
return editor.session === session;
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
if (isUsed) {
|
|
148
|
+
session = this.$cloneSession(session);
|
|
149
|
+
}
|
|
150
|
+
editor.setSession(session);
|
|
151
|
+
return session;
|
|
152
|
+
};
|
|
153
|
+
this.getOrientation = function() {
|
|
154
|
+
return this.$orientation;
|
|
155
|
+
};
|
|
156
|
+
this.setOrientation = function(orientation) {
|
|
157
|
+
if (this.$orientation == orientation) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
this.$orientation = orientation;
|
|
161
|
+
this.resize();
|
|
162
|
+
};
|
|
163
|
+
this.resize = function() {
|
|
164
|
+
var width = this.$container.clientWidth;
|
|
165
|
+
var height = this.$container.clientHeight;
|
|
166
|
+
var editor;
|
|
167
|
+
|
|
168
|
+
if (this.$orientation == this.BESIDE) {
|
|
169
|
+
var editorWidth = width / this.$splits;
|
|
170
|
+
for (var i = 0; i < this.$splits; i++) {
|
|
171
|
+
editor = this.$editors[i];
|
|
172
|
+
editor.container.style.width = editorWidth + "px";
|
|
173
|
+
editor.container.style.top = "0px";
|
|
174
|
+
editor.container.style.left = i * editorWidth + "px";
|
|
175
|
+
editor.container.style.height = height + "px";
|
|
176
|
+
editor.resize();
|
|
177
|
+
}
|
|
178
|
+
} else {
|
|
179
|
+
var editorHeight = height / this.$splits;
|
|
180
|
+
for (var i = 0; i < this.$splits; i++) {
|
|
181
|
+
editor = this.$editors[i];
|
|
182
|
+
editor.container.style.width = width + "px";
|
|
183
|
+
editor.container.style.top = i * editorHeight + "px";
|
|
184
|
+
editor.container.style.left = "0px";
|
|
185
|
+
editor.container.style.height = editorHeight + "px";
|
|
186
|
+
editor.resize();
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
}).call(Split.prototype);
|
|
192
|
+
|
|
193
|
+
exports.Split = Split;
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
ace.define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) {
|
|
197
|
+
"use strict";
|
|
198
|
+
module.exports = require("../split");
|
|
199
|
+
|
|
200
|
+
}); (function() {
|
|
201
|
+
ace.require(["ace/ext/split"], function(m) {
|
|
202
|
+
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
203
|
+
module.exports = m;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
})();
|
|
207
|
+
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var EditSession = require("../edit_session").EditSession;
|
|
5
|
+
var TextLayer = require("../layer/text").Text;
|
|
6
|
+
var baseStyles = ".ace_static_highlight {\
|
|
7
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\
|
|
8
|
+
font-size: 12px;\
|
|
9
|
+
white-space: pre-wrap\
|
|
10
|
+
}\
|
|
11
|
+
.ace_static_highlight .ace_gutter {\
|
|
12
|
+
width: 2em;\
|
|
13
|
+
text-align: right;\
|
|
14
|
+
padding: 0 3px 0 0;\
|
|
15
|
+
margin-right: 3px;\
|
|
16
|
+
contain: none;\
|
|
17
|
+
}\
|
|
18
|
+
.ace_static_highlight.ace_show_gutter .ace_line {\
|
|
19
|
+
padding-left: 2.6em;\
|
|
20
|
+
}\
|
|
21
|
+
.ace_static_highlight .ace_line { position: relative; }\
|
|
22
|
+
.ace_static_highlight .ace_gutter-cell {\
|
|
23
|
+
-moz-user-select: -moz-none;\
|
|
24
|
+
-khtml-user-select: none;\
|
|
25
|
+
-webkit-user-select: none;\
|
|
26
|
+
user-select: none;\
|
|
27
|
+
top: 0;\
|
|
28
|
+
bottom: 0;\
|
|
29
|
+
left: 0;\
|
|
30
|
+
position: absolute;\
|
|
31
|
+
}\
|
|
32
|
+
.ace_static_highlight .ace_gutter-cell:before {\
|
|
33
|
+
content: counter(ace_line, decimal);\
|
|
34
|
+
counter-increment: ace_line;\
|
|
35
|
+
}\
|
|
36
|
+
.ace_static_highlight {\
|
|
37
|
+
counter-reset: ace_line;\
|
|
38
|
+
}\
|
|
39
|
+
";
|
|
40
|
+
var config = require("../config");
|
|
41
|
+
var dom = require("../lib/dom");
|
|
42
|
+
var escapeHTML = require("../lib/lang").escapeHTML;
|
|
43
|
+
|
|
44
|
+
function Element(type) {
|
|
45
|
+
this.type = type;
|
|
46
|
+
this.style = {};
|
|
47
|
+
this.textContent = "";
|
|
48
|
+
}
|
|
49
|
+
Element.prototype.cloneNode = function() {
|
|
50
|
+
return this;
|
|
51
|
+
};
|
|
52
|
+
Element.prototype.appendChild = function(child) {
|
|
53
|
+
this.textContent += child.toString();
|
|
54
|
+
};
|
|
55
|
+
Element.prototype.toString = function() {
|
|
56
|
+
var stringBuilder = [];
|
|
57
|
+
if (this.type != "fragment") {
|
|
58
|
+
stringBuilder.push("<", this.type);
|
|
59
|
+
if (this.className)
|
|
60
|
+
stringBuilder.push(" class='", this.className, "'");
|
|
61
|
+
var styleStr = [];
|
|
62
|
+
for (var key in this.style) {
|
|
63
|
+
styleStr.push(key, ":", this.style[key]);
|
|
64
|
+
}
|
|
65
|
+
if (styleStr.length)
|
|
66
|
+
stringBuilder.push(" style='", styleStr.join(""), "'");
|
|
67
|
+
stringBuilder.push(">");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (this.textContent) {
|
|
71
|
+
stringBuilder.push(this.textContent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (this.type != "fragment") {
|
|
75
|
+
stringBuilder.push("</", this.type, ">");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return stringBuilder.join("");
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
var simpleDom = {
|
|
83
|
+
createTextNode: function(textContent, element) {
|
|
84
|
+
return escapeHTML(textContent);
|
|
85
|
+
},
|
|
86
|
+
createElement: function(type) {
|
|
87
|
+
return new Element(type);
|
|
88
|
+
},
|
|
89
|
+
createFragment: function() {
|
|
90
|
+
return new Element("fragment");
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var SimpleTextLayer = function() {
|
|
95
|
+
this.config = {};
|
|
96
|
+
this.dom = simpleDom;
|
|
97
|
+
};
|
|
98
|
+
SimpleTextLayer.prototype = TextLayer.prototype;
|
|
99
|
+
|
|
100
|
+
var highlight = function(el, opts, callback) {
|
|
101
|
+
var m = el.className.match(/lang-(\w+)/);
|
|
102
|
+
var mode = opts.mode || m && ("ace/mode/" + m[1]);
|
|
103
|
+
if (!mode)
|
|
104
|
+
return false;
|
|
105
|
+
var theme = opts.theme || "ace/theme/textmate";
|
|
106
|
+
|
|
107
|
+
var data = "";
|
|
108
|
+
var nodes = [];
|
|
109
|
+
|
|
110
|
+
if (el.firstElementChild) {
|
|
111
|
+
var textLen = 0;
|
|
112
|
+
for (var i = 0; i < el.childNodes.length; i++) {
|
|
113
|
+
var ch = el.childNodes[i];
|
|
114
|
+
if (ch.nodeType == 3) {
|
|
115
|
+
textLen += ch.data.length;
|
|
116
|
+
data += ch.data;
|
|
117
|
+
} else {
|
|
118
|
+
nodes.push(textLen, ch);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
data = el.textContent;
|
|
123
|
+
if (opts.trim)
|
|
124
|
+
data = data.trim();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
highlight.render(data, mode, theme, opts.firstLineNumber, !opts.showGutter, function (highlighted) {
|
|
128
|
+
dom.importCssString(highlighted.css, "ace_highlight");
|
|
129
|
+
el.innerHTML = highlighted.html;
|
|
130
|
+
var container = el.firstChild.firstChild;
|
|
131
|
+
for (var i = 0; i < nodes.length; i += 2) {
|
|
132
|
+
var pos = highlighted.session.doc.indexToPosition(nodes[i]);
|
|
133
|
+
var node = nodes[i + 1];
|
|
134
|
+
var lineEl = container.children[pos.row];
|
|
135
|
+
lineEl && lineEl.appendChild(node);
|
|
136
|
+
}
|
|
137
|
+
callback && callback();
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
highlight.render = function(input, mode, theme, lineStart, disableGutter, callback) {
|
|
141
|
+
var waiting = 1;
|
|
142
|
+
var modeCache = EditSession.prototype.$modes;
|
|
143
|
+
if (typeof theme == "string") {
|
|
144
|
+
waiting++;
|
|
145
|
+
config.loadModule(['theme', theme], function(m) {
|
|
146
|
+
theme = m;
|
|
147
|
+
--waiting || done();
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
var modeOptions;
|
|
151
|
+
if (mode && typeof mode === "object" && !mode.getTokenizer) {
|
|
152
|
+
modeOptions = mode;
|
|
153
|
+
mode = modeOptions.path;
|
|
154
|
+
}
|
|
155
|
+
if (typeof mode == "string") {
|
|
156
|
+
waiting++;
|
|
157
|
+
config.loadModule(['mode', mode], function(m) {
|
|
158
|
+
if (!modeCache[mode] || modeOptions)
|
|
159
|
+
modeCache[mode] = new m.Mode(modeOptions);
|
|
160
|
+
mode = modeCache[mode];
|
|
161
|
+
--waiting || done();
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function done() {
|
|
165
|
+
var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter);
|
|
166
|
+
return callback ? callback(result) : result;
|
|
167
|
+
}
|
|
168
|
+
return --waiting || done();
|
|
169
|
+
};
|
|
170
|
+
highlight.renderSync = function(input, mode, theme, lineStart, disableGutter) {
|
|
171
|
+
lineStart = parseInt(lineStart || 1, 10);
|
|
172
|
+
|
|
173
|
+
var session = new EditSession("");
|
|
174
|
+
session.setUseWorker(false);
|
|
175
|
+
session.setMode(mode);
|
|
176
|
+
|
|
177
|
+
var textLayer = new SimpleTextLayer();
|
|
178
|
+
textLayer.setSession(session);
|
|
179
|
+
Object.keys(textLayer.$tabStrings).forEach(function(k) {
|
|
180
|
+
if (typeof textLayer.$tabStrings[k] == "string") {
|
|
181
|
+
var el = simpleDom.createFragment();
|
|
182
|
+
el.textContent = textLayer.$tabStrings[k];
|
|
183
|
+
textLayer.$tabStrings[k] = el;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
session.setValue(input);
|
|
188
|
+
var length = session.getLength();
|
|
189
|
+
|
|
190
|
+
var outerEl = simpleDom.createElement("div");
|
|
191
|
+
outerEl.className = theme.cssClass;
|
|
192
|
+
|
|
193
|
+
var innerEl = simpleDom.createElement("div");
|
|
194
|
+
innerEl.className = "ace_static_highlight" + (disableGutter ? "" : " ace_show_gutter");
|
|
195
|
+
innerEl.style["counter-reset"] = "ace_line " + (lineStart - 1);
|
|
196
|
+
|
|
197
|
+
for (var ix = 0; ix < length; ix++) {
|
|
198
|
+
var lineEl = simpleDom.createElement("div");
|
|
199
|
+
lineEl.className = "ace_line";
|
|
200
|
+
|
|
201
|
+
if (!disableGutter) {
|
|
202
|
+
var gutterEl = simpleDom.createElement("span");
|
|
203
|
+
gutterEl.className ="ace_gutter ace_gutter-cell";
|
|
204
|
+
gutterEl.textContent = "";
|
|
205
|
+
lineEl.appendChild(gutterEl);
|
|
206
|
+
}
|
|
207
|
+
textLayer.$renderLine(lineEl, ix, false);
|
|
208
|
+
lineEl.textContent += "\n";
|
|
209
|
+
innerEl.appendChild(lineEl);
|
|
210
|
+
}
|
|
211
|
+
outerEl.appendChild(innerEl);
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
css: baseStyles + theme.cssText,
|
|
215
|
+
html: outerEl.toString(),
|
|
216
|
+
session: session
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
module.exports = highlight;
|
|
221
|
+
module.exports.highlight = highlight;
|
|
222
|
+
}); (function() {
|
|
223
|
+
ace.require(["ace/ext/static_highlight"], function(m) {
|
|
224
|
+
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
225
|
+
module.exports = m;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
})();
|
|
229
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
|
|
2
|
+
"use strict";
|
|
3
|
+
var dom = require("../lib/dom");
|
|
4
|
+
var lang = require("../lib/lang");
|
|
5
|
+
|
|
6
|
+
var StatusBar = function(editor, parentNode) {
|
|
7
|
+
this.element = dom.createElement("div");
|
|
8
|
+
this.element.className = "ace_status-indicator";
|
|
9
|
+
this.element.style.cssText = "display: inline-block;";
|
|
10
|
+
parentNode.appendChild(this.element);
|
|
11
|
+
|
|
12
|
+
var statusUpdate = lang.delayedCall(function(){
|
|
13
|
+
this.updateStatus(editor);
|
|
14
|
+
}.bind(this)).schedule.bind(null, 100);
|
|
15
|
+
|
|
16
|
+
editor.on("changeStatus", statusUpdate);
|
|
17
|
+
editor.on("changeSelection", statusUpdate);
|
|
18
|
+
editor.on("keyboardActivity", statusUpdate);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
(function(){
|
|
22
|
+
this.updateStatus = function(editor) {
|
|
23
|
+
var status = [];
|
|
24
|
+
function add(str, separator) {
|
|
25
|
+
str && status.push(str, separator || "|");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
add(editor.keyBinding.getStatusText(editor));
|
|
29
|
+
if (editor.commands.recording)
|
|
30
|
+
add("REC");
|
|
31
|
+
|
|
32
|
+
var sel = editor.selection;
|
|
33
|
+
var c = sel.lead;
|
|
34
|
+
|
|
35
|
+
if (!sel.isEmpty()) {
|
|
36
|
+
var r = editor.getSelectionRange();
|
|
37
|
+
add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")", " ");
|
|
38
|
+
}
|
|
39
|
+
add(c.row + ":" + c.column, " ");
|
|
40
|
+
if (sel.rangeCount)
|
|
41
|
+
add("[" + sel.rangeCount + "]", " ");
|
|
42
|
+
status.pop();
|
|
43
|
+
this.element.textContent = status.join("");
|
|
44
|
+
};
|
|
45
|
+
}).call(StatusBar.prototype);
|
|
46
|
+
|
|
47
|
+
exports.StatusBar = StatusBar;
|
|
48
|
+
|
|
49
|
+
}); (function() {
|
|
50
|
+
ace.require(["ace/ext/statusbar"], function(m) {
|
|
51
|
+
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
52
|
+
module.exports = m;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
})();
|
|
56
|
+
|