You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

670 lines
21 KiB

10 months ago
  1. ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"], function(acequire, exports, module) {
  2. 'use strict';
  3. module.exports.createOption = function createOption (obj) {
  4. var attribute;
  5. var el = document.createElement('option');
  6. for(attribute in obj) {
  7. if(obj.hasOwnProperty(attribute)) {
  8. if(attribute === 'selected') {
  9. el.setAttribute(attribute, obj[attribute]);
  10. } else {
  11. el[attribute] = obj[attribute];
  12. }
  13. }
  14. }
  15. return el;
  16. };
  17. module.exports.createCheckbox = function createCheckbox (id, checked, clss) {
  18. var el = document.createElement('input');
  19. el.setAttribute('type', 'checkbox');
  20. el.setAttribute('id', id);
  21. el.setAttribute('name', id);
  22. el.setAttribute('value', checked);
  23. el.setAttribute('class', clss);
  24. if(checked) {
  25. el.setAttribute('checked', 'checked');
  26. }
  27. return el;
  28. };
  29. module.exports.createInput = function createInput (id, value, clss) {
  30. var el = document.createElement('input');
  31. el.setAttribute('type', 'text');
  32. el.setAttribute('id', id);
  33. el.setAttribute('name', id);
  34. el.setAttribute('value', value);
  35. el.setAttribute('class', clss);
  36. return el;
  37. };
  38. module.exports.createLabel = function createLabel (text, labelFor) {
  39. var el = document.createElement('label');
  40. el.setAttribute('for', labelFor);
  41. el.textContent = text;
  42. return el;
  43. };
  44. module.exports.createSelection = function createSelection (id, values, clss) {
  45. var el = document.createElement('select');
  46. el.setAttribute('id', id);
  47. el.setAttribute('name', id);
  48. el.setAttribute('class', clss);
  49. values.forEach(function(item) {
  50. el.appendChild(module.exports.createOption(item));
  51. });
  52. return el;
  53. };
  54. });
  55. ace.define("ace/ext/modelist",["require","exports","module"], function(acequire, exports, module) {
  56. "use strict";
  57. var modes = [];
  58. function getModeForPath(path) {
  59. var mode = modesByName.text;
  60. var fileName = path.split(/[\/\\]/).pop();
  61. for (var i = 0; i < modes.length; i++) {
  62. if (modes[i].supportsFile(fileName)) {
  63. mode = modes[i];
  64. break;
  65. }
  66. }
  67. return mode;
  68. }
  69. var Mode = function(name, caption, extensions) {
  70. this.name = name;
  71. this.caption = caption;
  72. this.mode = "ace/mode/" + name;
  73. this.extensions = extensions;
  74. var re;
  75. if (/\^/.test(extensions)) {
  76. re = extensions.replace(/\|(\^)?/g, function(a, b){
  77. return "$|" + (b ? "^" : "^.*\\.");
  78. }) + "$";
  79. } else {
  80. re = "^.*\\.(" + extensions + ")$";
  81. }
  82. this.extRe = new RegExp(re, "gi");
  83. };
  84. Mode.prototype.supportsFile = function(filename) {
  85. return filename.match(this.extRe);
  86. };
  87. var supportedModes = {
  88. ABAP: ["abap"],
  89. ABC: ["abc"],
  90. ActionScript:["as"],
  91. ADA: ["ada|adb"],
  92. Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
  93. AsciiDoc: ["asciidoc|adoc"],
  94. Assembly_x86:["asm|a"],
  95. AutoHotKey: ["ahk"],
  96. BatchFile: ["bat|cmd"],
  97. Bro: ["bro"],
  98. C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
  99. C9Search: ["c9search_results"],
  100. Cirru: ["cirru|cr"],
  101. Clojure: ["clj|cljs"],
  102. Cobol: ["CBL|COB"],
  103. coffee: ["coffee|cf|cson|^Cakefile"],
  104. ColdFusion: ["cfm"],
  105. CSharp: ["cs"],
  106. Csound_Document: ["csd"],
  107. Csound_Orchestra: ["orc"],
  108. Csound_Score: ["sco"],
  109. CSS: ["css"],
  110. Curly: ["curly"],
  111. D: ["d|di"],
  112. Dart: ["dart"],
  113. Diff: ["diff|patch"],
  114. Dockerfile: ["^Dockerfile"],
  115. Dot: ["dot"],
  116. Drools: ["drl"],
  117. Dummy: ["dummy"],
  118. DummySyntax: ["dummy"],
  119. Eiffel: ["e|ge"],
  120. EJS: ["ejs"],
  121. Elixir: ["ex|exs"],
  122. Elm: ["elm"],
  123. Erlang: ["erl|hrl"],
  124. Forth: ["frt|fs|ldr|fth|4th"],
  125. Fortran: ["f|f90"],
  126. FTL: ["ftl"],
  127. Gcode: ["gcode"],
  128. Gherkin: ["feature"],
  129. Gitignore: ["^.gitignore"],
  130. Glsl: ["glsl|frag|vert"],
  131. Gobstones: ["gbs"],
  132. golang: ["go"],
  133. GraphQLSchema: ["gql"],
  134. Groovy: ["groovy"],
  135. HAML: ["haml"],
  136. Handlebars: ["hbs|handlebars|tpl|mustache"],
  137. Haskell: ["hs"],
  138. Haskell_Cabal: ["cabal"],
  139. haXe: ["hx"],
  140. Hjson: ["hjson"],
  141. HTML: ["html|htm|xhtml|vue|we|wpy"],
  142. HTML_Elixir: ["eex|html.eex"],
  143. HTML_Ruby: ["erb|rhtml|html.erb"],
  144. INI: ["ini|conf|cfg|prefs"],
  145. Io: ["io"],
  146. Jack: ["jack"],
  147. Jade: ["jade|pug"],
  148. Java: ["java"],
  149. JavaScript: ["js|jsm|jsx"],
  150. JSON: ["json"],
  151. JSONiq: ["jq"],
  152. JSP: ["jsp"],
  153. JSSM: ["jssm|jssm_state"],
  154. JSX: ["jsx"],
  155. Julia: ["jl"],
  156. Kotlin: ["kt|kts"],
  157. LaTeX: ["tex|latex|ltx|bib"],
  158. LESS: ["less"],
  159. Liquid: ["liquid"],
  160. Lisp: ["lisp"],
  161. LiveScript: ["ls"],
  162. LogiQL: ["logic|lql"],
  163. LSL: ["lsl"],
  164. Lua: ["lua"],
  165. LuaPage: ["lp"],
  166. Lucene: ["lucene"],
  167. Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
  168. Markdown: ["md|markdown"],
  169. Mask: ["mask"],
  170. MATLAB: ["matlab"],
  171. Maze: ["mz"],
  172. MEL: ["mel"],
  173. MUSHCode: ["mc|mush"],
  174. MySQL: ["mysql"],
  175. Nix: ["nix"],
  176. NSIS: ["nsi|nsh"],
  177. ObjectiveC: ["m|mm"],
  178. OCaml: ["ml|mli"],
  179. Pascal: ["pas|p"],
  180. Perl: ["pl|pm"],
  181. pgSQL: ["pgsql"],
  182. PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
  183. Pig: ["pig"],
  184. Powershell: ["ps1"],
  185. Praat: ["praat|praatscript|psc|proc"],
  186. Prolog: ["plg|prolog"],
  187. Properties: ["properties"],
  188. Protobuf: ["proto"],
  189. Python: ["py"],
  190. R: ["r"],
  191. Razor: ["cshtml|asp"],
  192. RDoc: ["Rd"],
  193. Red: ["red|reds"],
  194. RHTML: ["Rhtml"],
  195. RST: ["rst"],
  196. Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
  197. Rust: ["rs"],
  198. SASS: ["sass"],
  199. SCAD: ["scad"],
  200. Scala: ["scala"],
  201. Scheme: ["scm|sm|rkt|oak|scheme"],
  202. SCSS: ["scss"],
  203. SH: ["sh|bash|^.bashrc"],
  204. SJS: ["sjs"],
  205. Smarty: ["smarty|tpl"],
  206. snippets: ["snippets"],
  207. Soy_Template:["soy"],
  208. Space: ["space"],
  209. SQL: ["sql"],
  210. SQLServer: ["sqlserver"],
  211. Stylus: ["styl|stylus"],
  212. SVG: ["svg"],
  213. Swift: ["swift"],
  214. Tcl: ["tcl"],
  215. Tex: ["tex"],
  216. Text: ["txt"],
  217. Textile: ["textile"],
  218. Toml: ["toml"],
  219. TSX: ["tsx"],
  220. Twig: ["twig|swig"],
  221. Typescript: ["ts|typescript|str"],
  222. Vala: ["vala"],
  223. VBScript: ["vbs|vb"],
  224. Velocity: ["vm"],
  225. Verilog: ["v|vh|sv|svh"],
  226. VHDL: ["vhd|vhdl"],
  227. Wollok: ["wlk|wpgm|wtest"],
  228. XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
  229. XQuery: ["xq"],
  230. YAML: ["yaml|yml"],
  231. Django: ["html"]
  232. };
  233. var nameOverrides = {
  234. ObjectiveC: "Objective-C",
  235. CSharp: "C#",
  236. golang: "Go",
  237. C_Cpp: "C and C++",
  238. Csound_Document: "Csound Document",
  239. Csound_Orchestra: "Csound",
  240. Csound_Score: "Csound Score",
  241. coffee: "CoffeeScript",
  242. HTML_Ruby: "HTML (Ruby)",
  243. HTML_Elixir: "HTML (Elixir)",
  244. FTL: "FreeMarker"
  245. };
  246. var modesByName = {};
  247. for (var name in supportedModes) {
  248. var data = supportedModes[name];
  249. var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
  250. var filename = name.toLowerCase();
  251. var mode = new Mode(filename, displayName, data[0]);
  252. modesByName[filename] = mode;
  253. modes.push(mode);
  254. }
  255. module.exports = {
  256. getModeForPath: getModeForPath,
  257. modes: modes,
  258. modesByName: modesByName
  259. };
  260. });
  261. ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(acequire, exports, module) {
  262. "use strict";
  263. acequire("ace/lib/fixoldbrowsers");
  264. var themeData = [
  265. ["Chrome" ],
  266. ["Clouds" ],
  267. ["Crimson Editor" ],
  268. ["Dawn" ],
  269. ["Dreamweaver" ],
  270. ["Eclipse" ],
  271. ["GitHub" ],
  272. ["IPlastic" ],
  273. ["Solarized Light"],
  274. ["TextMate" ],
  275. ["Tomorrow" ],
  276. ["XCode" ],
  277. ["Kuroir"],
  278. ["KatzenMilch"],
  279. ["SQL Server" ,"sqlserver" , "light"],
  280. ["Ambiance" ,"ambiance" , "dark"],
  281. ["Chaos" ,"chaos" , "dark"],
  282. ["Clouds Midnight" ,"clouds_midnight" , "dark"],
  283. ["Cobalt" ,"cobalt" , "dark"],
  284. ["Gruvbox" ,"gruvbox" , "dark"],
  285. ["Green on Black" ,"gob" , "dark"],
  286. ["idle Fingers" ,"idle_fingers" , "dark"],
  287. ["krTheme" ,"kr_theme" , "dark"],
  288. ["Merbivore" ,"merbivore" , "dark"],
  289. ["Merbivore Soft" ,"merbivore_soft" , "dark"],
  290. ["Mono Industrial" ,"mono_industrial" , "dark"],
  291. ["Monokai" ,"monokai" , "dark"],
  292. ["Pastel on dark" ,"pastel_on_dark" , "dark"],
  293. ["Solarized Dark" ,"solarized_dark" , "dark"],
  294. ["Terminal" ,"terminal" , "dark"],
  295. ["Tomorrow Night" ,"tomorrow_night" , "dark"],
  296. ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"],
  297. ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"],
  298. ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"],
  299. ["Twilight" ,"twilight" , "dark"],
  300. ["Vibrant Ink" ,"vibrant_ink" , "dark"]
  301. ];
  302. exports.themesByName = {};
  303. exports.themes = themeData.map(function(data) {
  304. var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
  305. var theme = {
  306. caption: data[0],
  307. theme: "ace/theme/" + name,
  308. isDark: data[2] == "dark",
  309. name: name
  310. };
  311. exports.themesByName[name] = theme;
  312. return theme;
  313. });
  314. });
  315. ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"], function(acequire, exports, module) {
  316. 'use strict';
  317. module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) {
  318. var modelist = acequire('../modelist');
  319. var themelist = acequire('../themelist');
  320. editor.menuOptions = {
  321. setNewLineMode: [{
  322. textContent: "unix",
  323. value: "unix"
  324. }, {
  325. textContent: "windows",
  326. value: "windows"
  327. }, {
  328. textContent: "auto",
  329. value: "auto"
  330. }],
  331. setTheme: [],
  332. setMode: [],
  333. setKeyboardHandler: [{
  334. textContent: "ace",
  335. value: ""
  336. }, {
  337. textContent: "vim",
  338. value: "ace/keyboard/vim"
  339. }, {
  340. textContent: "emacs",
  341. value: "ace/keyboard/emacs"
  342. }, {
  343. textContent: "textarea",
  344. value: "ace/keyboard/textarea"
  345. }, {
  346. textContent: "sublime",
  347. value: "ace/keyboard/sublime"
  348. }]
  349. };
  350. editor.menuOptions.setTheme = themelist.themes.map(function(theme) {
  351. return {
  352. textContent: theme.caption,
  353. value: theme.theme
  354. };
  355. });
  356. editor.menuOptions.setMode = modelist.modes.map(function(mode) {
  357. return {
  358. textContent: mode.name,
  359. value: mode.mode
  360. };
  361. });
  362. };
  363. });
  364. ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"], function(acequire, exports, module) {
  365. 'use strict';
  366. module.exports.getSetFunctions = function getSetFunctions (editor) {
  367. var out = [];
  368. var my = {
  369. 'editor' : editor,
  370. 'session' : editor.session,
  371. 'renderer' : editor.renderer
  372. };
  373. var opts = [];
  374. var skip = [
  375. 'setOption',
  376. 'setUndoManager',
  377. 'setDocument',
  378. 'setValue',
  379. 'setBreakpoints',
  380. 'setScrollTop',
  381. 'setScrollLeft',
  382. 'setSelectionStyle',
  383. 'setWrapLimitRange'
  384. ];
  385. ['renderer', 'session', 'editor'].forEach(function(esra) {
  386. var esr = my[esra];
  387. var clss = esra;
  388. for(var fn in esr) {
  389. if(skip.indexOf(fn) === -1) {
  390. if(/^set/.test(fn) && opts.indexOf(fn) === -1) {
  391. opts.push(fn);
  392. out.push({
  393. 'functionName' : fn,
  394. 'parentObj' : esr,
  395. 'parentName' : clss
  396. });
  397. }
  398. }
  399. }
  400. });
  401. return out;
  402. };
  403. });
  404. ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions","ace/ace"], function(acequire, exports, module) {
  405. 'use strict';
  406. var egen = acequire('./element_generator');
  407. var addEditorMenuOptions = acequire('./add_editor_menu_options').addEditorMenuOptions;
  408. var getSetFunctions = acequire('./get_set_functions').getSetFunctions;
  409. module.exports.generateSettingsMenu = function generateSettingsMenu (editor) {
  410. var elements = [];
  411. function cleanupElementsList() {
  412. elements.sort(function(a, b) {
  413. var x = a.getAttribute('contains');
  414. var y = b.getAttribute('contains');
  415. return x.localeCompare(y);
  416. });
  417. }
  418. function wrapElements() {
  419. var topmenu = document.createElement('div');
  420. topmenu.setAttribute('id', 'ace_settingsmenu');
  421. elements.forEach(function(element) {
  422. topmenu.appendChild(element);
  423. });
  424. var el = topmenu.appendChild(document.createElement('div'));
  425. var version = acequire("../../ace").version;
  426. el.style.padding = "1em";
  427. el.textContent = "Ace version " + version;
  428. return topmenu;
  429. }
  430. function createNewEntry(obj, clss, item, val) {
  431. var el;
  432. var div = document.createElement('div');
  433. div.setAttribute('contains', item);
  434. div.setAttribute('class', 'ace_optionsMenuEntry');
  435. div.setAttribute('style', 'clear: both;');
  436. div.appendChild(egen.createLabel(
  437. item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(),
  438. item
  439. ));
  440. if (Array.isArray(val)) {
  441. el = egen.createSelection(item, val, clss);
  442. el.addEventListener('change', function(e) {
  443. try{
  444. editor.menuOptions[e.target.id].forEach(function(x) {
  445. if(x.textContent !== e.target.textContent) {
  446. delete x.selected;
  447. }
  448. });
  449. obj[e.target.id](e.target.value);
  450. } catch (err) {
  451. throw new Error(err);
  452. }
  453. });
  454. } else if(typeof val === 'boolean') {
  455. el = egen.createCheckbox(item, val, clss);
  456. el.addEventListener('change', function(e) {
  457. try{
  458. obj[e.target.id](!!e.target.checked);
  459. } catch (err) {
  460. throw new Error(err);
  461. }
  462. });
  463. } else {
  464. el = egen.createInput(item, val, clss);
  465. el.addEventListener('change', function(e) {
  466. try{
  467. if(e.target.value === 'true') {
  468. obj[e.target.id](true);
  469. } else if(e.target.value === 'false') {
  470. obj[e.target.id](false);
  471. } else {
  472. obj[e.target.id](e.target.value);
  473. }
  474. } catch (err) {
  475. throw new Error(err);
  476. }
  477. });
  478. }
  479. el.style.cssText = 'float:right;';
  480. div.appendChild(el);
  481. return div;
  482. }
  483. function makeDropdown(item, esr, clss, fn) {
  484. var val = editor.menuOptions[item];
  485. var currentVal = esr[fn]();
  486. if (typeof currentVal == 'object')
  487. currentVal = currentVal.$id;
  488. val.forEach(function(valuex) {
  489. if (valuex.value === currentVal)
  490. valuex.selected = 'selected';
  491. });
  492. return createNewEntry(esr, clss, item, val);
  493. }
  494. function handleSet(setObj) {
  495. var item = setObj.functionName;
  496. var esr = setObj.parentObj;
  497. var clss = setObj.parentName;
  498. var val;
  499. var fn = item.replace(/^set/, 'get');
  500. if(editor.menuOptions[item] !== undefined) {
  501. elements.push(makeDropdown(item, esr, clss, fn));
  502. } else if(typeof esr[fn] === 'function') {
  503. try {
  504. val = esr[fn]();
  505. if(typeof val === 'object') {
  506. val = val.$id;
  507. }
  508. elements.push(
  509. createNewEntry(esr, clss, item, val)
  510. );
  511. } catch (e) {
  512. }
  513. }
  514. }
  515. addEditorMenuOptions(editor);
  516. getSetFunctions(editor).forEach(function(setObj) {
  517. handleSet(setObj);
  518. });
  519. cleanupElementsList();
  520. return wrapElements();
  521. };
  522. });
  523. ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) {
  524. 'use strict';
  525. var dom = acequire("../../lib/dom");
  526. var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
  527. background-color: #F7F7F7;\
  528. color: black;\
  529. box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
  530. padding: 1em 0.5em 2em 1em;\
  531. overflow: auto;\
  532. position: absolute;\
  533. margin: 0;\
  534. bottom: 0;\
  535. right: 0;\
  536. top: 0;\
  537. z-index: 9991;\
  538. cursor: default;\
  539. }\
  540. .ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
  541. box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
  542. background-color: rgba(255, 255, 255, 0.6);\
  543. color: black;\
  544. }\
  545. .ace_optionsMenuEntry:hover {\
  546. background-color: rgba(100, 100, 100, 0.1);\
  547. -webkit-transition: all 0.5s;\
  548. transition: all 0.3s\
  549. }\
  550. .ace_closeButton {\
  551. background: rgba(245, 146, 146, 0.5);\
  552. border: 1px solid #F48A8A;\
  553. border-radius: 50%;\
  554. padding: 7px;\
  555. position: absolute;\
  556. right: -8px;\
  557. top: -8px;\
  558. z-index: 1000;\
  559. }\
  560. .ace_closeButton{\
  561. background: rgba(245, 146, 146, 0.9);\
  562. }\
  563. .ace_optionsMenuKey {\
  564. color: darkslateblue;\
  565. font-weight: bold;\
  566. }\
  567. .ace_optionsMenuCommand {\
  568. color: darkcyan;\
  569. font-weight: normal;\
  570. }";
  571. dom.importCssString(cssText);
  572. module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
  573. top = top ? 'top: ' + top + ';' : '';
  574. bottom = bottom ? 'bottom: ' + bottom + ';' : '';
  575. right = right ? 'right: ' + right + ';' : '';
  576. left = left ? 'left: ' + left + ';' : '';
  577. var closer = document.createElement('div');
  578. var contentContainer = document.createElement('div');
  579. function documentEscListener(e) {
  580. if (e.keyCode === 27) {
  581. closer.click();
  582. }
  583. }
  584. closer.style.cssText = 'margin: 0; padding: 0; ' +
  585. 'position: fixed; top:0; bottom:0; left:0; right:0;' +
  586. 'z-index: 9990; ' +
  587. 'background-color: rgba(0, 0, 0, 0.3);';
  588. closer.addEventListener('click', function() {
  589. document.removeEventListener('keydown', documentEscListener);
  590. closer.parentNode.removeChild(closer);
  591. editor.focus();
  592. closer = null;
  593. });
  594. document.addEventListener('keydown', documentEscListener);
  595. contentContainer.style.cssText = top + right + bottom + left;
  596. contentContainer.addEventListener('click', function(e) {
  597. e.stopPropagation();
  598. });
  599. var wrapper = dom.createElement("div");
  600. wrapper.style.position = "relative";
  601. var closeButton = dom.createElement("div");
  602. closeButton.className = "ace_closeButton";
  603. closeButton.addEventListener('click', function() {
  604. closer.click();
  605. });
  606. wrapper.appendChild(closeButton);
  607. contentContainer.appendChild(wrapper);
  608. contentContainer.appendChild(contentElement);
  609. closer.appendChild(contentContainer);
  610. document.body.appendChild(closer);
  611. editor.blur();
  612. };
  613. });
  614. ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"], function(acequire, exports, module) {
  615. "use strict";
  616. var generateSettingsMenu = acequire('./menu_tools/generate_settings_menu').generateSettingsMenu;
  617. var overlayPage = acequire('./menu_tools/overlay_page').overlayPage;
  618. function showSettingsMenu(editor) {
  619. var sm = document.getElementById('ace_settingsmenu');
  620. if (!sm)
  621. overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0');
  622. }
  623. module.exports.init = function(editor) {
  624. var Editor = acequire("ace/editor").Editor;
  625. Editor.prototype.showSettingsMenu = function() {
  626. showSettingsMenu(this);
  627. };
  628. };
  629. });
  630. (function() {
  631. ace.acequire(["ace/ext/settings_menu"], function() {});
  632. })();