Commit 15483206 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Ace Editor: Import the entire source code.

parent 45ed32ce
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts73343854.36</string> </value>
<value> <string>ts77155552.54</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155552.86</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-keybinding_menu.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl\n
* All rights reserved.\n
*\n
* Contributed to Ajax.org under the BSD license.\n
*\n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
*\n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/ext/keybinding_menu\', [\'require\', \'exports\', \'module\' , \'ace/editor\', \'ace/ext/menu_tools/overlay_page\', \'ace/ext/menu_tools/get_editor_keyboard_shortcuts\'], function(require, exports, module) {\n
\n
var Editor = require("ace/editor").Editor;\n
function showKeyboardShortcuts (editor) {\n
if(!document.getElementById(\'kbshortcutmenu\')) {\n
var overlayPage = require(\'./menu_tools/overlay_page\').overlayPage;\n
var getEditorKeybordShortcuts = require(\'./menu_tools/get_editor_keyboard_shortcuts\').getEditorKeybordShortcuts;\n
var kb = getEditorKeybordShortcuts(editor);\n
var el = document.createElement(\'div\');\n
var commands = kb.reduce(function(previous, current) {\n
return previous + \'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">\' \n
+ current.command + \'</span> : \'\n
+ \'<span class="ace_optionsMenuKey">\' + current.key + \'</span></div>\';\n
}, \'\');\n
\n
el.id = \'kbshortcutmenu\';\n
el.innerHTML = \'<h1>Keyboard Shortcuts</h1>\' + commands + \'</div>\';\n
overlayPage(editor, el, \'0\', \'0\', \'0\', null);\n
}\n
};\n
module.exports.init = function(editor) {\n
Editor.prototype.showKeyboardShortcuts = function() {\n
showKeyboardShortcuts(this);\n
};\n
editor.commands.addCommands([{\n
name: "showKeyboardShortcuts",\n
bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},\n
exec: function(editor, line) {\n
editor.showKeyboardShortcuts();\n
}\n
}]);\n
};\n
\n
});\n
\n
define(\'ace/ext/menu_tools/overlay_page\', [\'require\', \'exports\', \'module\' , \'ace/lib/dom\'], function(require, exports, module) {\n
\n
var dom = require("../../lib/dom");\n
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\\\n
background-color: #F7F7F7;\\\n
color: black;\\\n
box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\\\n
padding: 1em 0.5em 2em 1em;\\\n
overflow: auto;\\\n
position: absolute;\\\n
margin: 0;\\\n
bottom: 0;\\\n
right: 0;\\\n
top: 0;\\\n
z-index: 9991;\\\n
cursor: default;\\\n
}\\\n
.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\\\n
box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\\\n
background-color: rgba(255, 255, 255, 0.6);\\\n
color: black;\\\n
}\\\n
.ace_optionsMenuEntry:hover {\\\n
background-color: rgba(100, 100, 100, 0.1);\\\n
-webkit-transition: all 0.5s;\\\n
transition: all 0.3s\\\n
}\\\n
.ace_closeButton {\\\n
background: rgba(245, 146, 146, 0.5);\\\n
border: 1px solid #F48A8A;\\\n
border-radius: 50%;\\\n
padding: 7px;\\\n
position: absolute;\\\n
right: -8px;\\\n
top: -8px;\\\n
z-index: 1000;\\\n
}\\\n
.ace_closeButton{\\\n
background: rgba(245, 146, 146, 0.9);\\\n
}\\\n
.ace_optionsMenuKey {\\\n
color: darkslateblue;\\\n
font-weight: bold;\\\n
}\\\n
.ace_optionsMenuCommand {\\\n
color: darkcyan;\\\n
font-weight: normal;\\\n
}";\n
dom.importCssString(cssText);\n
module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {\n
top = top ? \'top: \' + top + \';\' : \'\';\n
bottom = bottom ? \'bottom: \' + bottom + \';\' : \'\';\n
right = right ? \'right: \' + right + \';\' : \'\';\n
left = left ? \'left: \' + left + \';\' : \'\';\n
\n
var closer = document.createElement(\'div\');\n
var contentContainer = document.createElement(\'div\');\n
\n
function documentEscListener(e) {\n
if (e.keyCode === 27) {\n
closer.click();\n
}\n
}\n
\n
closer.style.cssText = \'margin: 0; padding: 0; \' +\n
\'position: fixed; top:0; bottom:0; left:0; right:0;\' +\n
\'z-index: 9990; \' +\n
\'background-color: rgba(0, 0, 0, 0.3);\';\n
closer.addEventListener(\'click\', function() {\n
document.removeEventListener(\'keydown\', documentEscListener);\n
closer.parentNode.removeChild(closer);\n
editor.focus();\n
closer = null;\n
});\n
document.addEventListener(\'keydown\', documentEscListener);\n
\n
contentContainer.style.cssText = top + right + bottom + left;\n
contentContainer.addEventListener(\'click\', function(e) {\n
e.stopPropagation();\n
});\n
\n
var wrapper = dom.createElement("div");\n
wrapper.style.position = "relative";\n
\n
var closeButton = dom.createElement("div");\n
closeButton.className = "ace_closeButton";\n
closeButton.addEventListener(\'click\', function() {\n
closer.click();\n
});\n
\n
wrapper.appendChild(closeButton);\n
contentContainer.appendChild(wrapper);\n
\n
contentContainer.appendChild(contentElement);\n
closer.appendChild(contentContainer);\n
document.body.appendChild(closer);\n
editor.blur();\n
};\n
\n
});\n
\n
define(\'ace/ext/menu_tools/get_editor_keyboard_shortcuts\', [\'require\', \'exports\', \'module\' , \'ace/lib/keys\'], function(require, exports, module) {\n
\n
var keys = require("../../lib/keys");\n
module.exports.getEditorKeybordShortcuts = function(editor) {\n
var KEY_MODS = keys.KEY_MODS;\n
var keybindings = [];\n
var commandMap = {};\n
editor.keyBinding.$handlers.forEach(function(handler) {\n
var ckb = handler.commmandKeyBinding;\n
for (var i in ckb) {\n
var modifier = parseInt(i);\n
if (modifier == -1) {\n
modifier = "";\n
} else if(isNaN(modifier)) {\n
modifier = i;\n
} else {\n
modifier = "" +\n
(modifier & KEY_MODS.command ? "Cmd-" : "") +\n
(modifier & KEY_MODS.ctrl ? "Ctrl-" : "") +\n
(modifier & KEY_MODS.alt ? "Alt-" : "") +\n
(modifier & KEY_MODS.shift ? "Shift-" : "");\n
}\n
for (var key in ckb[i]) {\n
var command = ckb[i][key]\n
if (typeof command != "string")\n
command = command.name\n
if (commandMap[command]) {\n
commandMap[command].key += "|" + modifier + key;\n
} else {\n
commandMap[command] = {key: modifier+key, command: command};\n
keybindings.push(commandMap[command]);\n
}\n
}\n
}\n
});\n
return keybindings;\n
};\n
\n
});
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>7803</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.0</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-modelist.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
define(\'ace/ext/modelist\', [\'require\', \'exports\', \'module\' ], function(require, exports, module) {\n
\n
\n
var modes = [];\n
function getModeForPath(path) {\n
var mode = modesByName.text;\n
var fileName = path.split(/[\\/\\\\]/).pop();\n
for (var i = 0; i < modes.length; i++) {\n
if (modes[i].supportsFile(fileName)) {\n
mode = modes[i];\n
break;\n
}\n
}\n
return mode;\n
}\n
\n
var Mode = function(name, caption, extensions) {\n
this.name = name;\n
this.caption = caption;\n
this.mode = "ace/mode/" + name;\n
this.extensions = extensions;\n
if (/\\^/.test(extensions)) {\n
var re = extensions.replace(/\\|(\\^)?/g, function(a, b){\n
return "$|" + (b ? "^" : "^.*\\\\.");\n
}) + "$";\n
} else {\n
var re = "^.*\\\\.(" + extensions + ")$";\n
}\n
\n
this.extRe = new RegExp(re, "gi");\n
};\n
\n
Mode.prototype.supportsFile = function(filename) {\n
return filename.match(this.extRe);\n
};\n
var supportedModes = {\n
ABAP: ["abap"],\n
ADA: ["ada|adb"],\n
ActionScript:["as"],\n
AsciiDoc: ["asciidoc"],\n
Assembly_x86:["asm"],\n
AutoHotKey: ["ahk"],\n
BatchFile: ["bat|cmd"],\n
C9Search: ["c9search_results"],\n
C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],\n
Clojure: ["clj"],\n
Cobol: ["^CBL|COB"],\n
coffee: ["^Cakefile|coffee|cf|cson"],\n
ColdFusion: ["cfm"],\n
CSharp: ["cs"],\n
CSS: ["css"],\n
Curly: ["curly"],\n
D: ["d|di"],\n
Dart: ["dart"],\n
Diff: ["diff|patch"],\n
Dot: ["dot"],\n
Erlang: ["erl|hrl"],\n
EJS: ["ejs"],\n
Forth: ["frt|fs|ldr"],\n
FreeMarker: ["ftl"],\n
Glsl: ["glsl|frag|vert"],\n
golang: ["go"],\n
Groovy: ["groovy"],\n
HAML: ["haml"],\n
Haskell: ["hs"],\n
haXe: ["hx"],\n
HTML: ["htm|html|xhtml"],\n
HTML_Ruby: ["erb|rhtml|html.erb"],\n
Ini: ["Ini|conf"],\n
Jade: ["jade"],\n
Java: ["java"],\n
JavaScript: ["js"],\n
JSON: ["json"],\n
JSONiq: ["jq"],\n
JSP: ["jsp"],\n
JSX: ["jsx"],\n
Julia: ["jl"],\n
LaTeX: ["latex|tex|ltx|bib"],\n
LESS: ["less"],\n
Liquid: ["liquid"],\n
Lisp: ["lisp"],\n
LiveScript: ["ls"],\n
LogiQL: ["logic|lql"],\n
LSL: ["lsl"],\n
Lua: ["lua"],\n
LuaPage: ["lp"],\n
Lucene: ["lucene"],\n
Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],\n
MATLAB: ["matlab"],\n
Markdown: ["md|markdown"],\n
MySQL: ["mysql"],\n
MUSHCode: ["mc|mush"],\n
ObjectiveC: ["m|mm"],\n
OCaml: ["ml|mli"],\n
Pascal: ["pas|p"],\n
Perl: ["pl|pm"],\n
pgSQL: ["pgsql"],\n
PHP: ["php|phtml"],\n
Powershell: ["ps1"],\n
Prolog: ["plg|prolog"],\n
Properties: ["properties"],\n
Python: ["py"],\n
R: ["r"],\n
RDoc: ["Rd"],\n
RHTML: ["Rhtml"],\n
Ruby: ["ru|gemspec|rake|rb"],\n
Rust: ["rs"],\n
SASS: ["sass"],\n
SCAD: ["scad"],\n
Scala: ["scala"],\n
Scheme: ["scm|rkt"],\n
SCSS: ["scss"],\n
SH: ["sh|bash"],\n
snippets: ["snippets"],\n
SQL: ["sql"],\n
Stylus: ["styl|stylus"],\n
SVG: ["svg"],\n
Tcl: ["tcl"],\n
Tex: ["tex"],\n
Text: ["txt"],\n
Textile: ["textile"],\n
Toml: ["toml"],\n
Twig: ["twig"],\n
Typescript: ["typescript|ts|str"],\n
VBScript: ["vbs"],\n
Velocity: ["vm"],\n
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],\n
XQuery: ["xq"],\n
YAML: ["yaml"]\n
};\n
\n
var nameOverrides = {\n
ObjectiveC: "Objective-C",\n
CSharp: "C#",\n
golang: "Go",\n
C_Cpp: "C/C++",\n
coffee: "CoffeeScript",\n
HTML_Ruby: "HTML (Ruby)"\n
};\n
var modesByName = {};\n
for (var name in supportedModes) {\n
var data = supportedModes[name];\n
var displayName = nameOverrides[name] || name;\n
var filename = name.toLowerCase();\n
var mode = new Mode(filename, displayName, data[0]);\n
modesByName[filename] = mode;\n
modes.push(mode);\n
}\n
\n
module.exports = {\n
getModeForPath: getModeForPath,\n
modes: modes,\n
modesByName: modesByName\n
};\n
\n
});\n
\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4320</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.14</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-options.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
define(\'ace/ext/options\', [\'require\', \'exports\', \'module\' ], function(require, exports, module) {\n
\n
\n
var modesByName = modelist.modesByName;\n
\n
var options = [\n
["Document", function(name) {\n
doclist.loadDoc(name, function(session) {\n
if (!session)\n
return;\n
session = env.split.setSession(session);\n
updateUIEditorOptions();\n
env.editor.focus();\n
});\n
}, doclist.all],\n
\t["Mode", function(value) {\n
env.editor.session.setMode(modesByName[value].mode || modesByName.text.mode);\n
env.editor.session.modeName = value;\n
\t}, function(value) {\n
\t\treturn env.editor.session.modeName || "text"\n
\t}, modelist.modes],\n
\t["Split", function(value) {\n
\t\tvar sp = env.split;\n
\t\tif (value == "none") {\n
\t\t\tif (sp.getSplits() == 2) {\n
\t\t\t\tenv.secondSession = sp.getEditor(1).session;\n
}\n
sp.setSplits(1);\n
} else {\n
var newEditor = (sp.getSplits() == 1);\n
if (value == "below") {\n
sp.setOrientation(sp.BELOW);\n
} else {\n
sp.setOrientation(sp.BESIDE);\n
}\n
sp.setSplits(2);\n
\n
if (newEditor) {\n
\t\t\t\tvar session = env.secondSession || sp.getEditor(0).session;\n
var newSession = sp.setSession(session, 1);\n
newSession.name = session.name;\n
}\n
}\n
\t}, ["None", "Beside", "Below"]],\n
\t["Theme", function(value) {\n
\t\tif (!value)\n
\t\t\treturn;\n
\t\tenv.editor.setTheme("ace/theme/" + value);\n
\t\tthemeEl.selectedValue = value;\n
\t}, function() {\n
\t\treturn env.editor.getTheme();\n
\t}, {\n
\t\t"Bright": {\n
chrome: "Chrome",\n
clouds: "Clouds",\n
crimson_editor: "Crimson Editor",\n
dawn: "Dawn",\n
dreamweaver: "Dreamweaver",\n
eclipse: "Eclipse",\n
github: "GitHub",\n
solarized_light: "Solarized Light",\n
textmate: "TextMate",\n
tomorrow: "Tomorrow",\n
xcode: "XCode"\n
},\n
"Dark": {\n
ambiance: "Ambiance",\n
chaos: "Chaos",\n
clouds_midnight: "Clouds Midnight",\n
cobalt: "Cobalt",\n
idle_fingers: "idleFingers",\n
kr_theme: "krTheme",\n
merbivore: "Merbivore",\n
merbivore_soft: "Merbivore Soft",\n
mono_industrial: "Mono Industrial",\n
monokai: "Monokai",\n
pastel_on_dark: "Pastel on dark",\n
solarized_dark: "Solarized Dark",\n
twilight: "Twilight",\n
tomorrow_night: "Tomorrow Night",\n
tomorrow_night_blue: "Tomorrow Night Blue",\n
tomorrow_night_bright: "Tomorrow Night Bright",\n
tomorrow_night_eighties: "Tomorrow Night 80s",\n
vibrant_ink: "Vibrant Ink",\n
}\n
\t}],\n
\t["Code Folding", function(value) {\n
\t\tenv.editor.getSession().setFoldStyle(value);\n
\t\tenv.editor.setShowFoldWidgets(value !== "manual");\n
\t}, ["manual", "mark begin", "mark begin and end"]],\n
\t["Soft Wrap", function(value) {\n
\t\tvalue = value.toLowerCase()\n
\t\tvar session = env.editor.getSession();\n
\t\tvar renderer = env.editor.renderer;\n
\t\tsession.setUseWrapMode(value == "off");\n
\t\tvar col = parseInt(value) || null;\n
\t\trenderer.setPrintMarginColumn(col || 80);\n
\t\tsession.setWrapLimitRange(col, col);\n
\t}, ["Off", "40 Chars", "80 Chars", "Free"]],\n
\t["Key Binding", function(value) {\n
\t\tenv.editor.setKeyboardHandler(keybindings[value]);\n
\t}, ["Ace", "Vim", "Emacs", "Custom"]],\n
\t["Font Size", function(value) {\n
\t\tenv.split.setFontSize(value + "px");\n
\t}, [10, 11, 12, 14, 16, 20, 24]],\n
["Full Line Selection", function(checked) {\n
\t\tenv.editor.setSelectionStyle(checked ? "line" : "text");\n
\t}],\n
\t["Highlight Active Line", function(checked) {\n
\t\tenv.editor.setHighlightActiveLine(checked);\n
\t}],\n
\t["Show Invisibles", function(checked) {\n
\t\tenv.editor.setShowInvisibles(checked);\n
\t}],\n
\t["Show Gutter", function(checked) {\n
\t\tenv.editor.renderer.setShowGutter(checked);\n
\t}],\n
["Show Indent Guides", function(checked) {\n
\t\tenv.editor.renderer.setDisplayIndentGuides(checked);\n
\t}],\n
\t["Show Print Margin", function(checked) {\n
\t\tenv.editor.renderer.setShowPrintMargin(checked);\n
\t}],\n
\t["Persistent HScroll", function(checked) {\n
\t\tenv.editor.renderer.setHScrollBarAlwaysVisible(checked);\n
\t}],\n
\t["Animate Scrolling", function(checked) {\n
\t\tenv.editor.setAnimatedScroll(checked);\n
\t}],\n
\t["Use Soft Tab", function(checked) {\n
\t\tenv.editor.getSession().setUseSoftTabs(checked);\n
\t}],\n
\t["Highlight Selected Word", function(checked) {\n
\t\tenv.editor.setHighlightSelectedWord(checked);\n
\t}],\n
\t["Enable Behaviours", function(checked) {\n
\t\tenv.editor.setBehavioursEnabled(checked);\n
\t}],\n
\t["Fade Fold Widgets", function(checked) {\n
\t\tenv.editor.setFadeFoldWidgets(checked);\n
\t}],\n
\t["Show Token info", function(checked) {\n
\t\tenv.editor.setFadeFoldWidgets(checked);\n
\t}]\n
]\n
\n
var createOptionsPanel = function(options) {\n
\tvar html = []\n
\tvar container = document.createElement("div");\n
\tcontainer.style.cssText = "position: absolute; overflow: hidden";\n
\tvar inner = document.createElement("div");\n
\tinner.style.cssText = "width: 120%;height:100%;overflow: scroll";\n
\tcontainer.appendChild(inner);\n
\thtml.push("<table><tbody>");\n
\t\n
\toptions.forEach(function(o) {\n
\t\t\n
});\n
\n
\thtml.push(\n
\t\t\'<tr>\',\n
\t\t \'<td>\',\n
\t\t\t\'<label for="\', s,\'"></label>\',\n
\t\t \'</td><td>\',\n
\t\t\t\'<input type="\', s,\'" name="\', s,\'" id="\',s ,\'">\',\n
\t\t \'</td>\',\n
\t\t\'</tr>\'\n
\t)\n
\thtml.push("</tbody></table>");\t\n
\treturn container;\n
}\n
\n
function bindCheckbox(id, callback) {\n
var el = document.getElementById(id);\n
if (localStorage && localStorage.getItem(id))\n
el.checked = localStorage.getItem(id) == "1";\n
\n
var onCheck = function() {\n
callback(!!el.checked);\n
saveOption(el);\n
};\n
el.onclick = onCheck;\n
onCheck();\n
}\n
\n
function bindDropdown(id, callback) {\n
var el = document.getElementById(id);\n
if (localStorage && localStorage.getItem(id))\n
el.value = localStorage.getItem(id);\n
\n
var onChange = function() {\n
callback(el.value);\n
saveOption(el);\n
};\n
\n
el.onchange = onChange;\n
onChange();\n
}\n
\n
function fillOptgroup(list, el) {\n
list.forEach(function(item) {\n
var option = document.createElement("option");\n
option.setAttribute("value", item.name);\n
option.innerHTML = item.desc;\n
el.appendChild(option);\n
});\n
}\n
\n
function fillDropdown(list, el) {\n
\tif (Array.isArray(list)) {\n
\t\tfillOptgroup(list, el);\n
\t\treturn;\n
\t}\n
\tfor(var i in list) {\n
\t\tvar group = document.createElement("optgroup");\n
\t\tgroup.setAttribute("label", i);\n
\t\tfillOptgroup(list[i], group);\n
\t\tel.appendChild(group);\n
\t}\n
}\n
\n
function createOptionControl(opt) {\n
if (opt.values) {\n
var el = dom.createElement("select");\n
el.setAttribute("size", opt.visibleSize || 1);\n
fillDropdown(opt.values, el) \n
} else {\n
var el = dom.createElement("checkbox");\n
}\n
el.setAttribute("name", "opt_" + opt.name)\n
return el;\n
}\n
\n
function createOptionCell(opt) {\n
if (opt.values) {\n
var el = dom.createElement("select");\n
el.setAttribute("size", opt.visibleSize || 1);\n
fillDropdown(opt.values, el) \n
} else {\n
var el = dom.createElement("checkbox");\n
}\n
el.setAttribute("name", "opt_" + opt.name)\n
return el;\n
}\n
\n
\n
createOptionsPanel(options)\n
\n
\n
\n
});\n
\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>7247</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts76361245.98</string> </value>
<value> <string>ts77155553.29</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts76362800.02</string> </value>
<value> <string>ts77155553.44</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.56</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-spellcheck.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>define(\'ace/ext/spellcheck\', [\'require\', \'exports\', \'module\' , \'ace/lib/event\', \'ace/editor\', \'ace/config\'], function(require, exports, module) {\n
\n
var event = require("../lib/event");\n
\n
exports.contextMenuHandler = function(e){\n
var host = e.target;\n
var text = host.textInput.getElement();\n
if (!host.selection.isEmpty())\n
return;\n
var c = host.getCursorPosition();\n
var r = host.session.getWordRange(c.row, c.column);\n
var w = host.session.getTextRange(r);\n
\n
host.session.tokenRe.lastIndex = 0;\n
if (!host.session.tokenRe.test(w))\n
return;\n
var PLACEHOLDER = "\\x01\\x01";\n
var value = w + " " + PLACEHOLDER;\n
text.value = value;\n
text.setSelectionRange(w.length + 1, w.length + 1);\n
text.setSelectionRange(0, 0);\n
\n
var afterKeydown = false;\n
event.addListener(text, "keydown", function onKeydown() {\n
event.removeListener(text, "keydown", onKeydown);\n
afterKeydown = true;\n
});\n
\n
host.textInput.setInputHandler(function(newVal) {\n
console.log(newVal , value, text.selectionStart, text.selectionEnd)\n
if (newVal == value)\n
return \'\';\n
if (newVal.lastIndexOf(value, 0) === 0)\n
return newVal.slice(value.length);\n
if (newVal.substr(text.selectionEnd) == value)\n
return newVal.slice(0, -value.length);\n
if (newVal.slice(-2) == PLACEHOLDER) {\n
var val = newVal.slice(0, -2);\n
if (val.slice(-1) == " ") {\n
if (afterKeydown)\n
return val.substring(0, text.selectionEnd);\n
val = val.slice(0, -1);\n
host.session.replace(r, val);\n
return "";\n
}\n
}\n
\n
return newVal;\n
});\n
};\n
var Editor = require("../editor").Editor;\n
require("../config").defineOptions(Editor.prototype, "editor", {\n
spellcheck: {\n
set: function(val) {\n
var text = this.textInput.getElement();\n
text.spellcheck = !!val;\n
if (!val)\n
this.removeListener("nativecontextmenu", exports.contextMenuHandler);\n
else\n
this.on("nativecontextmenu", exports.contextMenuHandler);\n
},\n
value: true\n
}\n
});\n
\n
});\n
\n
</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2227</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.66</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-static_highlight.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2010, Ajax.org B.V.\n
* All rights reserved.\n
*\n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
*\n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/ext/static_highlight\', [\'require\', \'exports\', \'module\' , \'ace/edit_session\', \'ace/layer/text\', \'ace/config\'], function(require, exports, module) {\n
\n
\n
var EditSession = require("../edit_session").EditSession;\n
var TextLayer = require("../layer/text").Text;\n
var baseStyles = ".ace_editor {\\\n
font-family: \'Monaco\', \'Menlo\', \'Droid Sans Mono\', \'Courier New\', monospace;\\\n
font-size: 12px;\\\n
}\\\n
.ace_editor .ace_gutter {\\\n
width: 25px !important;\\\n
display: block;\\\n
float: left;\\\n
text-align: right;\\\n
padding: 0 3px 0 0;\\\n
margin-right: 3px;\\\n
}\\\n
.ace_line { clear: both; }\\\n
*.ace_gutter-cell {\\\n
-moz-user-select: -moz-none;\\\n
-khtml-user-select: none;\\\n
-webkit-user-select: none;\\\n
user-select: none;\\\n
}";\n
var config = require("../config");\n
\n
exports.render = function(input, mode, theme, lineStart, disableGutter, callback) {\n
var waiting = 0\n
if (typeof theme == "string") {\n
waiting++;\n
config.loadModule([\'theme\', theme], function(m) {\n
theme = m;\n
--waiting || done();\n
});\n
}\n
\n
if (typeof mode == "string") {\n
waiting++;\n
config.loadModule([\'mode\', mode], function(m) {\n
mode = new m.Mode()\n
--waiting || done();\n
});\n
}\n
function done() {\n
var result = exports.renderSync(input, mode, theme, lineStart, disableGutter);\n
return callback ? callback(result) : result;\n
}\n
return waiting || done();\n
};\n
\n
exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {\n
lineStart = parseInt(lineStart || 1, 10);\n
\n
var session = new EditSession("");\n
session.setUseWorker(false);\n
session.setMode(mode);\n
\n
var textLayer = new TextLayer(document.createElement("div"));\n
textLayer.setSession(session);\n
textLayer.config = {\n
characterWidth: 10,\n
lineHeight: 20\n
};\n
\n
session.setValue(input);\n
\n
var stringBuilder = [];\n
var length = session.getLength();\n
\n
for(var ix = 0; ix < length; ix++) {\n
stringBuilder.push("<div class=\'ace_line\'>");\n
if (!disableGutter)\n
stringBuilder.push("<span class=\'ace_gutter ace_gutter-cell\' unselectable=\'on\'>" + (ix + lineStart) + "</span>");\n
textLayer.$renderLine(stringBuilder, ix, true, false);\n
stringBuilder.push("</div>");\n
}\n
var html = "<div class=\':cssClass\'>\\\n
<div class=\'ace_editor ace_scroller ace_text-layer\'>\\\n
:code\\\n
</div>\\\n
</div>".replace(/:cssClass/, theme.cssClass).replace(/:code/, stringBuilder.join(""));\n
\n
textLayer.destroy();\n
\n
return {\n
css: baseStyles + theme.cssText,\n
html: html\n
};\n
};\n
\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4310</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.77</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-statusbar.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
define(\'ace/ext/statusbar\', [\'require\', \'exports\', \'module\' , \'ace/lib/dom\', \'ace/lib/lang\'], function(require, exports, module) {\n
var dom = require("ace/lib/dom");\n
var lang = require("ace/lib/lang");\n
\n
var StatusBar = function(editor, parentNode) {\n
this.element = dom.createElement("div");\n
this.element.className = "ace_status-indicator";\n
this.element.style.cssText = "display: inline-block;";\n
parentNode.appendChild(this.element);\n
\n
var statusUpdate = lang.delayedCall(function(){\n
this.updateStatus(editor)\n
}.bind(this));\n
editor.on("changeStatus", function() {\n
statusUpdate.schedule(100);\n
});\n
editor.on("changeSelection", function() {\n
statusUpdate.schedule(100);\n
});\n
};\n
\n
(function(){\n
this.updateStatus = function(editor) {\n
var status = [];\n
function add(str, separator) {\n
str && status.push(str, separator || "|");\n
}\n
\n
if (editor.$vimModeHandler)\n
add(editor.$vimModeHandler.getStatusText());\n
else if (editor.commands.recording)\n
add("REC");\n
\n
var c = editor.selection.lead;\n
add(c.row + ":" + c.column, " ");\n
if (!editor.selection.isEmpty()) {\n
var r = editor.getSelectionRange();\n
add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")");\n
}\n
status.pop();\n
this.element.textContent = status.join("");\n
};\n
}).call(StatusBar.prototype);\n
\n
exports.StatusBar = StatusBar;\n
\n
});
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1508</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ext-statusbar.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.04</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-themelist.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl\n
* All rights reserved.\n
*\n
* Contributed to Ajax.org under the BSD license.\n
*\n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
*\n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/ext/themelist\', [\'require\', \'exports\', \'module\' , \'ace/ext/themelist_utils/themes\'], function(require, exports, module) {\n
module.exports.themes = require(\'ace/ext/themelist_utils/themes\').themes;\n
module.exports.ThemeDescription = function(name) {\n
this.name = name;\n
this.desc = name.split(\'_\'\n
).map(\n
function(namePart) {\n
return namePart[0].toUpperCase() + namePart.slice(1);\n
}\n
).join(\' \');\n
this.theme = "ace/theme/" + name;\n
};\n
\n
module.exports.themesByName = {};\n
\n
module.exports.themes = module.exports.themes.map(function(name) {\n
module.exports.themesByName[name] = new module.exports.ThemeDescription(name);\n
return module.exports.themesByName[name];\n
});\n
\n
});\n
\n
define(\'ace/ext/themelist_utils/themes\', [\'require\', \'exports\', \'module\' ], function(require, exports, module) {\n
\n
module.exports.themes = [\n
"ambiance",\n
"chaos",\n
"chrome",\n
"clouds",\n
"clouds_midnight",\n
"cobalt",\n
"crimson_editor",\n
"dawn",\n
"dreamweaver",\n
"eclipse",\n
"github",\n
"idle_fingers",\n
"kr_theme",\n
"merbivore",\n
"merbivore_soft",\n
"monokai",\n
"mono_industrial",\n
"pastel_on_dark",\n
"solarized_dark",\n
"solarized_light",\n
"terminal",\n
"textmate",\n
"tomorrow",\n
"tomorrow_night",\n
"tomorrow_night_blue",\n
"tomorrow_night_bright",\n
"tomorrow_night_eighties",\n
"twilight",\n
"vibrant_ink",\n
"xcode"\n
];\n
\n
});</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3224</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.14</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-whitespace.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2010, Ajax.org B.V.\n
* All rights reserved.\n
*\n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
*\n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/ext/whitespace\', [\'require\', \'exports\', \'module\' , \'ace/lib/lang\'], function(require, exports, module) {\n
\n
\n
var lang = require("../lib/lang");\n
exports.$detectIndentation = function(lines, fallback) {\n
var stats = [];\n
var changes = [];\n
var tabIndents = 0;\n
var prevSpaces = 0;\n
var max = Math.min(lines.length, 1000);\n
for (var i = 0; i < max; i++) {\n
var line = lines[i];\n
if (!/^\\s*[^*+\\-\\s]/.test(line))\n
continue;\n
\n
var tabs = line.match(/^\\t*/)[0].length;\n
if (line[0] == "\\t")\n
tabIndents++;\n
\n
var spaces = line.match(/^ */)[0].length;\n
if (spaces && line[spaces] != "\\t") {\n
var diff = spaces - prevSpaces;\n
if (diff > 0 && !(prevSpaces%diff) && !(spaces%diff))\n
changes[diff] = (changes[diff] || 0) + 1;\n
\n
stats[spaces] = (stats[spaces] || 0) + 1;\n
}\n
prevSpaces = spaces;\n
while (line[line.length - 1] == "\\\\")\n
line = lines[i++];\n
};\n
\n
function getScore(indent) {\n
var score = 0;\n
for (var i = indent; i < stats.length; i += indent)\n
score += stats[i] || 0;\n
return score;\n
}\n
\n
var changesTotal = changes.reduce(function(a,b){return a+b}, 0);\n
\n
var first = {score: 0, length: 0};\n
var spaceIndents = 0;\n
for (var i = 1; i < 12; i++) {\n
if (i == 1) {\n
spaceIndents = getScore(i);\n
var score = 1;\n
} else\n
var score = getScore(i) / spaceIndents;\n
\n
if (changes[i]) {\n
score += changes[i] / changesTotal;\n
}\n
\n
if (score > first.score)\n
first = {score: score, length: i};\n
}\n
\n
if (first.score && first.score > 1.4)\n
var tabLength = first.length;\n
\n
if (tabIndents > spaceIndents + 1)\n
return {ch: "\\t", length: tabLength};\n
\n
if (spaceIndents + 1 > tabIndents)\n
return {ch: " ", length: tabLength};\n
};\n
\n
exports.detectIndentation = function(session) {\n
var lines = session.getLines(0, 1000);\n
var indent = exports.$detectIndentation(lines) || {};\n
\n
if (indent.ch)\n
session.setUseSoftTabs(indent.ch == " ");\n
\n
if (indent.length)\n
session.setTabSize(indent.length);\n
return indent;\n
};\n
\n
exports.trimTrailingSpace = function(session) {\n
var doc = session.getDocument();\n
var lines = doc.getAllLines();\n
\n
for (var i = 0, l=lines.length; i < l; i++) {\n
var line = lines[i];\n
var index = line.search(/\\s+$/);\n
\n
if (index !== -1)\n
doc.removeInLine(i, index, line.length);\n
}\n
};\n
\n
exports.convertIndentation = function(session, ch, len) {\n
var oldCh = session.getTabString()[0];\n
var oldLen = session.getTabSize();\n
if (!len) len = oldLen;\n
if (!ch) ch = oldCh;\n
\n
var tab = ch == "\\t" ? ch: lang.stringRepeat(ch, len);\n
\n
var doc = session.doc;\n
var lines = doc.getAllLines();\n
\n
var cache = {};\n
var spaceCache = {};\n
for (var i = 0, l=lines.length; i < l; i++) {\n
var line = lines[i];\n
var match = line.match(/^\\s*/)[0];\n
if (match) {\n
var w = session.$getStringScreenWidth(match)[0];\n
var tabCount = Math.floor(w/oldLen);\n
var reminder = w%oldLen;\n
var toInsert = cache[tabCount] || (cache[tabCount] = lang.stringRepeat(tab, tabCount));\n
toInsert += spaceCache[reminder] || (spaceCache[reminder] = lang.stringRepeat(" ", reminder));\n
\n
if (toInsert != match) {\n
doc.removeInLine(i, 0, match.length);\n
doc.insertInLine({row: i, column: 0}, toInsert);\n
}\n
}\n
}\n
session.setTabSize(len);\n
session.setUseSoftTabs(ch == " ");\n
};\n
\n
exports.$parseStringArg = function(text) {\n
var indent = {}\n
if (/t/.test(text))\n
indent.ch = "\\t";\n
else if (/s/.test(text))\n
indent.ch = " ";\n
var m = text.match(/\\d+/);\n
if (m)\n
indent.length = parseInt(m[0]);\n
return indent;\n
};\n
\n
exports.$parseArg = function(arg) {\n
if (!arg)\n
return {};\n
if (typeof arg == "string")\n
return exports.$parseStringArg(arg);\n
if (typeof arg.text == "string")\n
return exports.$parseStringArg(arg.text);\n
return arg;\n
}\n
\n
exports.commands = [{\n
name: "detectIndentation",\n
exec: function(editor) {\n
exports.detectIndentation(editor.session);\n
}\n
}, {\n
name: "trimTrailingSpace",\n
exec: function(editor) {\n
exports.trimTrailingSpace(editor.session);\n
}\n
}, {\n
name: "convertIndentation",\n
exec: function(editor, arg) {\n
var indent = exports.$parseArg(arg);\n
exports.convertIndentation(editor.session, arg.ch, arg.length);\n
}\n
}, {\n
name: "setIndentation",\n
exec: function(editor, arg) {\n
var indent = exports.$parseArg(arg);\n
indent.length && editor.session.setTabSize(indent.length);\n
indent.ch && editor.session.setUseSoftTabs(indent.ch == " ");\n
}\n
}]\n
\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6632</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts76363578.4</string> </value>
<value> <string>ts77155554.27</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts76363589.24</string> </value>
<value> <string>ts77155554.39</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.74</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>mode-ada.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2010, Ajax.org B.V.\n
* All rights reserved.\n
* \n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
* \n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/mode/ada\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text\', \'ace/tokenizer\', \'ace/mode/ada_highlight_rules\', \'ace/range\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextMode = require("./text").Mode;\n
var Tokenizer = require("../tokenizer").Tokenizer;\n
var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules;\n
var Range = require("../range").Range;\n
\n
var Mode = function() {\n
this.$tokenizer = new Tokenizer(new AdaHighlightRules().getRules());\n
};\n
oop.inherits(Mode, TextMode);\n
\n
(function() {\n
\n
this.lineCommentStart = "--";\n
\n
}).call(Mode.prototype);\n
\n
exports.Mode = Mode;\n
\n
});\n
\n
define(\'ace/mode/ada_highlight_rules\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text_highlight_rules\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;\n
\n
var AdaHighlightRules = function() {\n
var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|" +\n
"access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|" +\n
"array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|" +\n
"body|private|then|if|procedure|type|case|in|protected|constant|interface|until|" +\n
"|is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor";\n
\n
var builtinConstants = (\n
"true|false|null"\n
);\n
\n
var builtinFunctions = (\n
"count|min|max|avg|sum|rank|now|coalesce|main"\n
);\n
\n
var keywordMapper = this.createKeywordMapper({\n
"support.function": builtinFunctions,\n
"keyword": keywords,\n
"constant.language": builtinConstants\n
}, "identifier", true);\n
\n
this.$rules = {\n
"start" : [ {\n
token : "comment",\n
regex : "--.*$"\n
}, {\n
token : "string", // " string\n
regex : \'".*?"\'\n
}, {\n
token : "string", // \' string\n
regex : "\'.*?\'"\n
}, {\n
token : "constant.numeric", // float\n
regex : "[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b"\n
}, {\n
token : keywordMapper,\n
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\\\b"\n
}, {\n
token : "keyword.operator",\n
regex : "\\\\+|\\\\-|\\\\/|\\\\/\\\\/|%|<@>|@>|<@|&|\\\\^|~|<|>|<=|=>|==|!=|<>|="\n
}, {\n
token : "paren.lparen",\n
regex : "[\\\\(]"\n
}, {\n
token : "paren.rparen",\n
regex : "[\\\\)]"\n
}, {\n
token : "text",\n
regex : "\\\\s+"\n
} ]\n
};\n
};\n
\n
oop.inherits(AdaHighlightRules, TextHighlightRules);\n
\n
exports.AdaHighlightRules = AdaHighlightRules;\n
});
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4503</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155555.23</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>mode-batchfile.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2012, Ajax.org B.V.\n
* All rights reserved.\n
*\n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
*\n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
*\n
* Contributor(s):\n
*\n
*\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/mode/batchfile\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text\', \'ace/tokenizer\', \'ace/mode/batchfile_highlight_rules\', \'ace/mode/folding/cstyle\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextMode = require("./text").Mode;\n
var Tokenizer = require("../tokenizer").Tokenizer;\n
var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules;\n
var FoldMode = require("./folding/cstyle").FoldMode;\n
\n
var Mode = function() {\n
var highlighter = new BatchFileHighlightRules();\n
this.foldingRules = new FoldMode();\n
this.$tokenizer = new Tokenizer(highlighter.getRules());\n
};\n
oop.inherits(Mode, TextMode);\n
\n
(function() {\n
this.lineCommentStart = "::";\n
this.blockComment = "";\n
}).call(Mode.prototype);\n
\n
exports.Mode = Mode;\n
});\n
\n
define(\'ace/mode/batchfile_highlight_rules\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text_highlight_rules\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;\n
\n
var BatchFileHighlightRules = function() {\n
\n
this.$rules = { start: \n
[ { token: \'keyword.command.dosbatch\',\n
regex: \'\\\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\\\b\',\n
caseInsensitive: true },\n
{ token: \'keyword.control.statement.dosbatch\',\n
regex: \'\\\\b(?:goto|call|exit)\\\\b\',\n
caseInsensitive: true },\n
{ token: \'keyword.control.conditional.if.dosbatch\',\n
regex: \'\\\\bif\\\\s+not\\\\s+(?:exist|defined|errorlevel|cmdextversion)\\\\b\',\n
caseInsensitive: true },\n
{ token: \'keyword.control.conditional.dosbatch\',\n
regex: \'\\\\b(?:if|else)\\\\b\',\n
caseInsensitive: true },\n
{ token: \'keyword.control.repeat.dosbatch\',\n
regex: \'\\\\bfor\\\\b\',\n
caseInsensitive: true },\n
{ token: \'keyword.operator.dosbatch\',\n
regex: \'\\\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\\\b\' },\n
{ token: [\'doc.comment\', \'comment\'],\n
regex: \'(?:^|\\\\b)(rem)($|\\\\s.*$)\',\n
caseInsensitive: true },\n
{ token: \'comment.line.colons.dosbatch\',\n
regex: \'::.*$\' },\n
{ include: \'variable\' },\n
{ token: \'punctuation.definition.string.begin.shell\',\n
regex: \'"\',\n
push: [ \n
{ token: \'punctuation.definition.string.end.shell\', regex: \'"\', next: \'pop\' },\n
{ include: \'variable\' },\n
{ defaultToken: \'string.quoted.double.dosbatch\' } ] },\n
{ token: \'keyword.operator.pipe.dosbatch\', regex: \'[|]\' },\n
{ token: \'keyword.operator.redirect.shell\',\n
regex: \'&>|\\\\d*>&\\\\d*|\\\\d*(?:>>|>|<)|\\\\d*<&|\\\\d*<>\' } ],\n
variable: [\n
{ token: \'constant.numeric\', regex: \'%%\\\\w+\'},\n
{ token: [\'markup.list\', \'constant.other\', \'markup.list\'],\n
regex: \'(%)(\\\\w+)(%?)\' }]}\n
\n
this.normalizeRules();\n
};\n
\n
BatchFileHighlightRules.metaData = { name: \'Batch File\',\n
scopeName: \'source.dosbatch\',\n
fileTypes: [ \'bat\' ] }\n
\n
\n
oop.inherits(BatchFileHighlightRules, TextHighlightRules);\n
\n
exports.BatchFileHighlightRules = BatchFileHighlightRules;\n
});\n
\n
define(\'ace/mode/folding/cstyle\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/range\', \'ace/mode/folding/fold_mode\'], function(require, exports, module) {\n
\n
\n
var oop = require("../../lib/oop");\n
var Range = require("../../range").Range;\n
var BaseFoldMode = require("./fold_mode").FoldMode;\n
\n
var FoldMode = exports.FoldMode = function(commentRegex) {\n
if (commentRegex) {\n
this.foldingStartMarker = new RegExp(\n
this.foldingStartMarker.source.replace(/\\|[^|]*?$/, "|" + commentRegex.start)\n
);\n
this.foldingStopMarker = new RegExp(\n
this.foldingStopMarker.source.replace(/\\|[^|]*?$/, "|" + commentRegex.end)\n
);\n
}\n
};\n
oop.inherits(FoldMode, BaseFoldMode);\n
\n
(function() {\n
\n
this.foldingStartMarker = /(\\{|\\[)[^\\}\\]]*$|^\\s*(\\/\\*)/;\n
this.foldingStopMarker = /^[^\\[\\{]*(\\}|\\])|^[\\s\\*]*(\\*\\/)/;\n
\n
this.getFoldWidgetRange = function(session, foldStyle, row) {\n
var line = session.getLine(row);\n
var match = line.match(this.foldingStartMarker);\n
if (match) {\n
var i = match.index;\n
\n
if (match[1])\n
return this.openingBracketBlock(session, match[1], row, i);\n
\n
return session.getCommentFoldRange(row, i + match[0].length, 1);\n
}\n
\n
if (foldStyle !== "markbeginend")\n
return;\n
\n
var match = line.match(this.foldingStopMarker);\n
if (match) {\n
var i = match.index + match[0].length;\n
\n
if (match[1])\n
return this.closingBracketBlock(session, match[1], row, i);\n
\n
return session.getCommentFoldRange(row, i, -1);\n
}\n
};\n
\n
}).call(FoldMode.prototype);\n
\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6952</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155555.33</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>mode-c9search.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2010, Ajax.org B.V.\n
* All rights reserved.\n
* \n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
* \n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/mode/c9search\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text\', \'ace/tokenizer\', \'ace/mode/c9search_highlight_rules\', \'ace/mode/matching_brace_outdent\', \'ace/mode/folding/c9search\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextMode = require("./text").Mode;\n
var Tokenizer = require("../tokenizer").Tokenizer;\n
var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules;\n
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;\n
var C9StyleFoldMode = require("./folding/c9search").FoldMode;\n
\n
var Mode = function() {\n
this.$tokenizer = new Tokenizer(new C9SearchHighlightRules().getRules());\n
this.$outdent = new MatchingBraceOutdent();\n
this.foldingRules = new C9StyleFoldMode();\n
};\n
oop.inherits(Mode, TextMode);\n
\n
(function() {\n
\n
this.getNextLineIndent = function(state, line, tab) {\n
var indent = this.$getIndent(line);\n
return indent;\n
};\n
\n
this.checkOutdent = function(state, line, input) {\n
return this.$outdent.checkOutdent(line, input);\n
};\n
\n
this.autoOutdent = function(state, doc, row) {\n
this.$outdent.autoOutdent(doc, row);\n
};\n
\n
}).call(Mode.prototype);\n
\n
exports.Mode = Mode;\n
\n
});\n
\n
define(\'ace/mode/c9search_highlight_rules\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text_highlight_rules\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;\n
\n
var C9SearchHighlightRules = function() {\n
this.$rules = {\n
"start" : [\n
{\n
token : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text"],\n
regex : "(^\\\\s+[0-9]+)(:\\\\s*)(.+)"\n
},\n
{\n
token : ["string", "text"], // single line\n
regex : "(.+)(:$)"\n
}\n
]\n
};\n
};\n
\n
oop.inherits(C9SearchHighlightRules, TextHighlightRules);\n
\n
exports.C9SearchHighlightRules = C9SearchHighlightRules;\n
\n
});\n
\n
define(\'ace/mode/matching_brace_outdent\', [\'require\', \'exports\', \'module\' , \'ace/range\'], function(require, exports, module) {\n
\n
\n
var Range = require("../range").Range;\n
\n
var MatchingBraceOutdent = function() {};\n
\n
(function() {\n
\n
this.checkOutdent = function(line, input) {\n
if (! /^\\s+$/.test(line))\n
return false;\n
\n
return /^\\s*\\}/.test(input);\n
};\n
\n
this.autoOutdent = function(doc, row) {\n
var line = doc.getLine(row);\n
var match = line.match(/^(\\s*\\})/);\n
\n
if (!match) return 0;\n
\n
var column = match[1].length;\n
var openBracePos = doc.findMatchingBracket({row: row, column: column});\n
\n
if (!openBracePos || openBracePos.row == row) return 0;\n
\n
var indent = this.$getIndent(doc.getLine(openBracePos.row));\n
doc.replace(new Range(row, 0, row, column-1), indent);\n
};\n
\n
this.$getIndent = function(line) {\n
return line.match(/^\\s*/)[0];\n
};\n
\n
}).call(MatchingBraceOutdent.prototype);\n
\n
exports.MatchingBraceOutdent = MatchingBraceOutdent;\n
});\n
\n
\n
define(\'ace/mode/folding/c9search\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/range\', \'ace/mode/folding/fold_mode\'], function(require, exports, module) {\n
\n
\n
var oop = require("../../lib/oop");\n
var Range = require("../../range").Range;\n
var BaseFoldMode = require("./fold_mode").FoldMode;\n
\n
var FoldMode = exports.FoldMode = function() {};\n
oop.inherits(FoldMode, BaseFoldMode);\n
\n
(function() {\n
\n
this.foldingStartMarker = /^(\\S.*\\:|Searching for.*)$/;\n
this.foldingStopMarker = /^(\\s+|Found.*)$/;\n
\n
this.getFoldWidgetRange = function(session, foldStyle, row) {\n
var lines = session.doc.getAllLines(row);\n
var line = lines[row];\n
var level1 = /^(Found.*|Searching for.*)$/;\n
var level2 = /^(\\S.*\\:|\\s*)$/;\n
var re = level1.test(line) ? level1 : level2;\n
\n
if (this.foldingStartMarker.test(line)) { \n
for (var i = row + 1, l = session.getLength(); i < l; i++) {\n
if (re.test(lines[i]))\n
break;\n
}\n
\n
return new Range(row, line.length, i, 0);\n
}\n
\n
if (this.foldingStopMarker.test(line)) {\n
for (var i = row - 1; i >= 0; i--) {\n
line = lines[i];\n
if (re.test(line))\n
break;\n
}\n
\n
return new Range(i, line.length, row, 0);\n
}\n
};\n
\n
}).call(FoldMode.prototype);\n
\n
});\n
\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6223</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155555.75</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>mode-cobol.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2010, Ajax.org B.V.\n
* All rights reserved.\n
* \n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
* \n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/mode/cobol\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text\', \'ace/tokenizer\', \'ace/mode/cobol_highlight_rules\', \'ace/range\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextMode = require("./text").Mode;\n
var Tokenizer = require("../tokenizer").Tokenizer;\n
var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules;\n
var Range = require("../range").Range;\n
\n
var Mode = function() {\n
this.$tokenizer = new Tokenizer(new CobolHighlightRules().getRules());\n
};\n
oop.inherits(Mode, TextMode);\n
\n
(function() {\n
\n
this.lineCommentStart = "*";\n
\n
}).call(Mode.prototype);\n
\n
exports.Mode = Mode;\n
\n
});\n
\n
define(\'ace/mode/cobol_highlight_rules\', [\'require\', \'exports\', \'module\' , \'ace/lib/oop\', \'ace/mode/text_highlight_rules\'], function(require, exports, module) {\n
\n
\n
var oop = require("../lib/oop");\n
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;\n
\n
var CobolHighlightRules = function() {\n
var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" +\n
"AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|" +\n
"ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|" +\n
"TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|" +\n
"UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|" +\n
"PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|" +\n
"CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|" +\n
"COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|" +\n
"RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|" +\n
"DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|" +\n
"ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|" +\n
"EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT";\n
\n
var builtinConstants = (\n
"true|false|null"\n
);\n
\n
var builtinFunctions = (\n
"count|min|max|avg|sum|rank|now|coalesce|main"\n
);\n
\n
var keywordMapper = this.createKeywordMapper({\n
"support.function": builtinFunctions,\n
"keyword": keywords,\n
"constant.language": builtinConstants\n
}, "identifier", true);\n
\n
this.$rules = {\n
"start" : [ {\n
token : "comment",\n
regex : "\\\\*.*$"\n
}, {\n
token : "string", // " string\n
regex : \'".*?"\'\n
}, {\n
token : "string", // \' string\n
regex : "\'.*?\'"\n
}, {\n
token : "constant.numeric", // float\n
regex : "[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b"\n
}, {\n
token : keywordMapper,\n
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\\\b"\n
}, {\n
token : "keyword.operator",\n
regex : "\\\\+|\\\\-|\\\\/|\\\\/\\\\/|%|<@>|@>|<@|&|\\\\^|~|<|>|<=|=>|==|!=|<>|="\n
}, {\n
token : "paren.lparen",\n
regex : "[\\\\(]"\n
}, {\n
token : "paren.rparen",\n
regex : "[\\\\)]"\n
}, {\n
token : "text",\n
regex : "\\\\s+"\n
} ]\n
};\n
};\n
\n
oop.inherits(CobolHighlightRules, TextHighlightRules);\n
\n
exports.CobolHighlightRules = CobolHighlightRules;\n
});
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5097</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts73343871.17</string> </value>
<value> <string>ts77155562.6</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment