Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Irakli Gozalishvili 2011-03-08 14:17:17 +01:00
commit 48cd0f049a
105 changed files with 10474 additions and 1504 deletions

6
.gitignore vendored
View file

@ -13,3 +13,9 @@
# A handy place to put stuff that git should ignore: # A handy place to put stuff that git should ignore:
/ignore/ /ignore/
support/async/
support/dryice/
support/jsdom/
support/node-htmlparser/
support/node-o3-xml/
support/requirejs/

View file

@ -53,6 +53,13 @@ copy({
dest: 'build/editor.html' dest: 'build/editor.html'
}); });
function filterTextPlugin(text) {
return text.replace(/(['"])text\!/g, "$1text/");
/*return text
.replace(/define\(\s*['"]text\!\)/g, "text/")
.replace(/require\(\s*['"]text\!\)/g, "text/")*/
}
var ace = copy.createDataObject(); var ace = copy.createDataObject();
copy({ copy({
source: [ source: [
@ -85,21 +92,12 @@ copy({
copy({ copy({
source: { source: {
root: project, root: project,
include: /.*\.css$|.*\.html$/, include: /.*\.css$/,
exclude: /tests?\// exclude: /tests?\//
}, },
filter: [ copy.filter.addDefines ], filter: [ copy.filter.addDefines ],
dest: ace dest: ace
}); });
copy({
source: {
root: project,
include: /.*\.png$|.*\.gif$/,
exclude: /tests?\//
},
filter: [ copy.filter.base64 ],
dest: ace
});
copy({ copy({
source: [ source: [
'build_support/boot.js' 'build_support/boot.js'
@ -111,11 +109,12 @@ copy({
// Create the compressed and uncompressed output files // Create the compressed and uncompressed output files
copy({ copy({
source: ace, source: ace,
filter: copy.filter.uglifyjs, filter: [copy.filter.uglifyjs, filterTextPlugin],
dest: 'build/src/ace.js' dest: 'build/src/ace.js'
}); });
copy({ copy({
source: ace, source: ace,
filter: [filterTextPlugin],
dest: 'build/src/ace-uncompressed.js' dest: 'build/src/ace-uncompressed.js'
}); });
@ -171,7 +170,7 @@ console.log('# ace modes ---------');
project.assumeAllFilesLoaded(); project.assumeAllFilesLoaded();
[ [
"css", "html", "javascript", "php", "python", "xml", "ruby", "java", "c_cpp", "css", "html", "javascript", "php", "python", "xml", "ruby", "java", "c_cpp",
"coffee", "perl" "coffee", "perl", "csharp", "svg"
].forEach(function(mode) { ].forEach(function(mode) {
console.log("mode " + mode); console.log("mode " + mode);
copy({ copy({
@ -181,7 +180,7 @@ project.assumeAllFilesLoaded();
require: [ 'ace/mode/' + mode ] require: [ 'ace/mode/' + mode ]
}) })
], ],
filter: [ copy.filter.debug, copy.filter.moduleDefines, copy.filter.uglifyjs ], filter: [ copy.filter.debug, copy.filter.moduleDefines, copy.filter.uglifyjs, filterTextPlugin ],
dest: "build/src/mode-" + mode + ".js" dest: "build/src/mode-" + mode + ".js"
}); });
}); });
@ -213,7 +212,7 @@ copy({
aceHome + "/lib/ace/worker/worker.js", aceHome + "/lib/ace/worker/worker.js",
jsWorker jsWorker
], ],
filter: [ copy.filter.uglifyjs ], filter: [ copy.filter.uglifyjs, filterTextPlugin ],
dest: "build/src/worker-javascript.js" dest: "build/src/worker-javascript.js"
}); });
@ -221,14 +220,15 @@ console.log('# ace themes ---------');
[ [
"clouds", "clouds_midnight", "cobalt", "dawn", "idle_fingers", "kr_theme", "clouds", "clouds_midnight", "cobalt", "dawn", "idle_fingers", "kr_theme",
"mono_industrial", "monokai", "pastel_on_dark", "twilight", "eclipse" "mono_industrial", "monokai", "pastel_on_dark", "twilight", "eclipse",
"merbivore", "merbivore_soft", "vibrant_ink"
].forEach(function(theme) { ].forEach(function(theme) {
copy({ copy({
source: [{ source: [{
root: aceHome + '/lib', root: aceHome + '/lib',
include: "ace/theme/" + theme + ".js" include: "ace/theme/" + theme + ".js"
}], }],
filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs ], filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs, filterTextPlugin ],
dest: "build/src/theme-" + theme + ".js" dest: "build/src/theme-" + theme + ".js"
}); });
}); });
@ -243,7 +243,7 @@ project.assumeAllFilesLoaded();
require: [ 'ace/keyboard/keybinding/' + keybinding ] require: [ 'ace/keyboard/keybinding/' + keybinding ]
}) })
], ],
filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs ], filter: [ copy.filter.moduleDefines, copy.filter.uglifyjs, filterTextPlugin ],
dest: "build/src/keybinding-" + keybinding + ".js" dest: "build/src/keybinding-" + keybinding + ".js"
}); });
}); });

View file

@ -127,7 +127,7 @@ copy({
copy({ copy({
source: ace, source: ace,
filter: [ filter: [
shadow, shadow
], ],
dest: 'build/textarea/src/ace-uncompressed.js' dest: 'build/textarea/src/ace-uncompressed.js'
}); });
@ -138,7 +138,7 @@ console.log('# ace modes ---------');
project.assumeAllFilesLoaded(); project.assumeAllFilesLoaded();
[ [
"css", "html", "javascript", "php", "python", "xml", "ruby", "java", "c_cpp", "css", "html", "javascript", "php", "python", "xml", "ruby", "java", "c_cpp",
"coffee", "perl" "coffee", "perl", "svg"
].forEach(function(mode) { ].forEach(function(mode) {
console.log("mode " + mode); console.log("mode " + mode);
copy({ copy({
@ -162,7 +162,8 @@ console.log('# ace themes ---------');
// create themes // create themes
[ [
"clouds", "clouds_midnight", "cobalt", "dawn", "idle_fingers", "kr_theme", "clouds", "clouds_midnight", "cobalt", "dawn", "idle_fingers", "kr_theme",
"mono_industrial", "monokai", "pastel_on_dark", "twilight", "eclipse" "mono_industrial", "monokai", "pastel_on_dark", "twilight", "eclipse",
"merbivore", "merbivore_soft", "vibrant_ink"
].forEach(function(theme) { ].forEach(function(theme) {
console.log("theme " + theme); console.log("theme " + theme);
copy({ copy({

View file

@ -22,7 +22,7 @@ Take Ace for a spin!
Check out the Ace live [demo](http://ajaxorg.github.com/ace/build/editor.html) or get a [Cloud9 IDE account](http://run.cloud9ide.com) to experience Ace while editing one of your own GitHub projects. Check out the Ace live [demo](http://ajaxorg.github.com/ace/build/editor.html) or get a [Cloud9 IDE account](http://run.cloud9ide.com) to experience Ace while editing one of your own GitHub projects.
If you want, you can use Ace as a textarea replacement thanks to the [Ace Bookmarklet][http://ajaxorg.github.com/ace/build/textarea/editor.html]. If you want, you can use Ace as a textarea replacement thanks to the [Ace Bookmarklet](http://ajaxorg.github.com/ace/build/textarea/editor.html).
History History
------- -------

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
define("ace/keyboard/keybinding/emacs",function(a,b,c){var d=a("ace/keyboard/state_handler").StateHandler,e=a("ace/keyboard/state_handler").matchCharacterOnly,f={start:[{key:"ctrl-x",then:"c-x"},{regex:["(?:command-([0-9]*))*","(down|ctrl-n)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(right|ctrl-f)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(up|ctrl-p)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(left|ctrl-b)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",regex:["(?:command-([0-9]*))","([^0-9]+)*"],match:e,exec:"inserttext",params:[{name:"times",match:1,type:"number",defaultValue:"1"},{name:"text",match:2}]},{comment:"This binding matches numbers as long as there is no meta_number in the buffer.",regex:["(command-[0-9]*)*","([0-9]+)"],match:e,disallowMatches:[1],exec:"inserttext",params:[{name:"text",match:2,type:"text"}]},{regex:["command-([0-9]*)","(command-[0-9]|[0-9])"],comment:"Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."}],"c-x":[{key:"ctrl-g",then:"start"},{key:"ctrl-s",exec:"save",then:"start"}]};b.Emacs=new d(f)}),define("ace/keyboard/state_handler",function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(state in a)this.$buildBindingsRegex(a[state]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?(a.key=new RegExp("^"+a.regex[1]+"$"),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var d=[];b&1&&d.push("ctrl"),b&8&&d.push("command"),b&2&&d.push("option"),b&4&&d.push("shift"),c&&d.push(c);var e=d.join("-"),f=a.buffer+e;b!=2&&(a.buffer=f);return{bufferToUse:f,symbolicName:e}},$find:function(a,b,c,e,f){var g={};this.keymapping[a.state].some(function(h){var i;if(h.key&&!h.key.test(c))return!1;if(h.regex&&!(i=h.regex.exec(b)))return!1;if(h.match&&!h.match(b,e,f,c))return!1;if(h.disallowMatches)for(var j=0;j<h.disallowMatches.length;j++)if(!!i[h.disallowMatches[j]])return!1;if(h.exec){g.command=h.exec;if(h.params){var k;g.args={},h.params.forEach(function(a){a.match!=null&&i!=null?k=i[a.match]||a.defaultValue:k=a.defaultValue,a.type==="number"&&(k=parseInt(k)),g.args[a.name]=k})}a.buffer=""}h.then&&(a.state=h.then,a.buffer=""),g.command==null&&(g.command="null"),d&&console.log("KeyboardStateMapper#find",h);return!0});if(g.command)return g;a.buffer="";return!1},handleKeyboard:function(a,b,c){if(b!=0&&(c==""||String.fromCharCode(0)))return null;var e=this.$composeBuffer(a,b,c),f=e.bufferToUse,g=e.symbolicName;e=this.$find(a,f,g,b,c),d&&console.log("KeyboardStateMapper#match",f,g,e);return e}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e}) define("ace/keyboard/keybinding/emacs",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){var d=a("ace/keyboard/state_handler").StateHandler,e=a("ace/keyboard/state_handler").matchCharacterOnly,f={start:[{key:"ctrl-x",then:"c-x"},{regex:["(?:command-([0-9]*))*","(down|ctrl-n)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(right|ctrl-f)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(up|ctrl-p)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(left|ctrl-b)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",regex:["(?:command-([0-9]*))","([^0-9]+)*"],match:e,exec:"inserttext",params:[{name:"times",match:1,type:"number",defaultValue:"1"},{name:"text",match:2}]},{comment:"This binding matches numbers as long as there is no meta_number in the buffer.",regex:["(command-[0-9]*)*","([0-9]+)"],match:e,disallowMatches:[1],exec:"inserttext",params:[{name:"text",match:2,type:"text"}]},{regex:["command-([0-9]*)","(command-[0-9]|[0-9])"],comment:"Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."}],"c-x":[{key:"ctrl-g",then:"start"},{key:"ctrl-s",exec:"save",then:"start"}]};b.Emacs=new d(f)}),define("ace/keyboard/state_handler",["require","exports","module"],function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(state in a)this.$buildBindingsRegex(a[state]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?(a.key=new RegExp("^"+a.regex[1]+"$"),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var d=[];b&1&&d.push("ctrl"),b&8&&d.push("command"),b&2&&d.push("option"),b&4&&d.push("shift"),c&&d.push(c);var e=d.join("-"),f=a.buffer+e;b!=2&&(a.buffer=f);return{bufferToUse:f,symbolicName:e}},$find:function(a,b,c,e,f){var g={};this.keymapping[a.state].some(function(h){var i;if(h.key&&!h.key.test(c))return!1;if(h.regex&&!(i=h.regex.exec(b)))return!1;if(h.match&&!h.match(b,e,f,c))return!1;if(h.disallowMatches)for(var j=0;j<h.disallowMatches.length;j++)if(!!i[h.disallowMatches[j]])return!1;if(h.exec){g.command=h.exec;if(h.params){var k;g.args={},h.params.forEach(function(a){a.match!=null&&i!=null?k=i[a.match]||a.defaultValue:k=a.defaultValue,a.type==="number"&&(k=parseInt(k)),g.args[a.name]=k})}a.buffer=""}h.then&&(a.state=h.then,a.buffer=""),g.command==null&&(g.command="null"),d&&console.log("KeyboardStateMapper#find",h);return!0});if(g.command)return g;a.buffer="";return!1},handleKeyboard:function(a,b,c){if(b!=0&&(c==""||String.fromCharCode(0)))return null;var e=this.$composeBuffer(a,b,c),f=e.bufferToUse,g=e.symbolicName;e=this.$find(a,f,g,b,c),d&&console.log("KeyboardStateMapper#match",f,g,e);return e}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e})

View file

@ -1 +1 @@
define("ace/keyboard/keybinding/vim",function(a,b,c){var d=a("ace/keyboard/state_handler").StateHandler,e=a("ace/keyboard/state_handler").matchCharacterOnly,f={start:[{key:"i",then:"insertMode"},{regex:["([0-9]*)","(k|up)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["([0-9]*)","(j|down|enter)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["([0-9]*)","(l|right)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["([0-9]*)","(h|left)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"Catch some keyboard input to stop it here",match:e}],insertMode:[{key:"esc",then:"start"}]};b.Vim=new d(f)}),define("ace/keyboard/state_handler",function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(state in a)this.$buildBindingsRegex(a[state]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?(a.key=new RegExp("^"+a.regex[1]+"$"),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var d=[];b&1&&d.push("ctrl"),b&8&&d.push("command"),b&2&&d.push("option"),b&4&&d.push("shift"),c&&d.push(c);var e=d.join("-"),f=a.buffer+e;b!=2&&(a.buffer=f);return{bufferToUse:f,symbolicName:e}},$find:function(a,b,c,e,f){var g={};this.keymapping[a.state].some(function(h){var i;if(h.key&&!h.key.test(c))return!1;if(h.regex&&!(i=h.regex.exec(b)))return!1;if(h.match&&!h.match(b,e,f,c))return!1;if(h.disallowMatches)for(var j=0;j<h.disallowMatches.length;j++)if(!!i[h.disallowMatches[j]])return!1;if(h.exec){g.command=h.exec;if(h.params){var k;g.args={},h.params.forEach(function(a){a.match!=null&&i!=null?k=i[a.match]||a.defaultValue:k=a.defaultValue,a.type==="number"&&(k=parseInt(k)),g.args[a.name]=k})}a.buffer=""}h.then&&(a.state=h.then,a.buffer=""),g.command==null&&(g.command="null"),d&&console.log("KeyboardStateMapper#find",h);return!0});if(g.command)return g;a.buffer="";return!1},handleKeyboard:function(a,b,c){if(b!=0&&(c==""||String.fromCharCode(0)))return null;var e=this.$composeBuffer(a,b,c),f=e.bufferToUse,g=e.symbolicName;e=this.$find(a,f,g,b,c),d&&console.log("KeyboardStateMapper#match",f,g,e);return e}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e}) define("ace/keyboard/keybinding/vim",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){var d=a("ace/keyboard/state_handler").StateHandler,e=a("ace/keyboard/state_handler").matchCharacterOnly,f={start:[{key:"i",then:"insertMode"},{regex:["([0-9]*)","(k|up)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["([0-9]*)","(j|down|enter)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["([0-9]*)","(l|right)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["([0-9]*)","(h|left)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"Catch some keyboard input to stop it here",match:e}],insertMode:[{key:"esc",then:"start"}]};b.Vim=new d(f)}),define("ace/keyboard/state_handler",["require","exports","module"],function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(state in a)this.$buildBindingsRegex(a[state]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?(a.key=new RegExp("^"+a.regex[1]+"$"),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var d=[];b&1&&d.push("ctrl"),b&8&&d.push("command"),b&2&&d.push("option"),b&4&&d.push("shift"),c&&d.push(c);var e=d.join("-"),f=a.buffer+e;b!=2&&(a.buffer=f);return{bufferToUse:f,symbolicName:e}},$find:function(a,b,c,e,f){var g={};this.keymapping[a.state].some(function(h){var i;if(h.key&&!h.key.test(c))return!1;if(h.regex&&!(i=h.regex.exec(b)))return!1;if(h.match&&!h.match(b,e,f,c))return!1;if(h.disallowMatches)for(var j=0;j<h.disallowMatches.length;j++)if(!!i[h.disallowMatches[j]])return!1;if(h.exec){g.command=h.exec;if(h.params){var k;g.args={},h.params.forEach(function(a){a.match!=null&&i!=null?k=i[a.match]||a.defaultValue:k=a.defaultValue,a.type==="number"&&(k=parseInt(k)),g.args[a.name]=k})}a.buffer=""}h.then&&(a.state=h.then,a.buffer=""),g.command==null&&(g.command="null"),d&&console.log("KeyboardStateMapper#find",h);return!0});if(g.command)return g;a.buffer="";return!1},handleKeyboard:function(a,b,c){if(b!=0&&(c==""||String.fromCharCode(0)))return null;var e=this.$composeBuffer(a,b,c),f=e.bufferToUse,g=e.symbolicName;e=this.$find(a,f,g,b,c),d&&console.log("KeyboardStateMapper#match",f,g,e);return e}},b.matchCharacterOnly=function(a,b,c,d){return b==0?!0:b==4&&c.length==1?!0:!1},b.StateHandler=e})

View file

@ -1 +1 @@
define("ace/mode/c_cpp",function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/c_cpp_highlight_rules").c_cppHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/c_cpp_highlight_rules",function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=new f,b=e.arrayToMap("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|typeid|bitor|extern|protected|typename|bool|false|public|union|break|float|register|unsigned|case|fro|reinterpret-cast|using|catch|friend|return|virtual|char|goto|short|void|class|if|signed|volatile|compl|inline|sizeof|wchar_t|const|int|static|while|const-cast|long|static_cast|xor|continue|mutable|struct|xor_eq|default|namespace|switch|delete|new|template|do|not|this|for".split("|")),c=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},a.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(a){return a=="this"?"variable.language":b.hasOwnProperty(a)?"keyword":c.hasOwnProperty(a)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]},this.addRules(a.getRules(),"doc-"),this.$rules["doc-start"][0].next="start"};d.inherits(h,g),b.c_cppHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc",regex:"\\*\\/",next:"start"},{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",regex:"s+"},{token:"comment.doc",regex:"TODO"},{token:"comment.doc",regex:"[^@\\*]+"},{token:"comment.doc",regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}) define("ace/mode/c_cpp",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/c_cpp_highlight_rules").c_cppHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=new f,b=e.arrayToMap("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|typeid|bitor|extern|protected|typename|bool|false|public|union|break|float|register|unsigned|case|fro|reinterpret-cast|using|catch|friend|return|virtual|char|goto|short|void|class|if|signed|volatile|compl|inline|sizeof|wchar_t|const|int|static|while|const-cast|long|static_cast|xor|continue|mutable|struct|xor_eq|default|namespace|switch|delete|new|template|do|not|this|for".split("|")),c=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},a.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(a){return a=="this"?"variable.language":b.hasOwnProperty(a)?"keyword":c.hasOwnProperty(a)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]},this.addRules(a.getRules(),"doc-"),this.$rules["doc-start"][0].next="start"};d.inherits(h,g),b.c_cppHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc",regex:"\\*\\/",next:"start"},{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",regex:"s+"},{token:"comment.doc",regex:"TODO"},{token:"comment.doc",regex:"[^@\\*]+"},{token:"comment.doc",regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f})

View file

@ -1 +1 @@
define("ace/mode/coffee",function(a,b,c){function j(){this.$tokenizer=new d((new e).getRules()),this.$outdent=new f}var d=a("ace/tokenizer").Tokenizer,e=a("ace/mode/coffee_highlight_rules").CoffeeHighlightRules,f=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=a("ace/range").Range,h=a("ace/mode/text").Mode,i=a("pilot/oop");i.inherits(j,h);var k=j.prototype,l=/(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/,m=/^(\s*)#/,n=/^\s*###(?!#)/,o=/^\s*/;k.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;(!e.length||e[e.length-1].type!=="comment")&&a==="start"&&l.test(b)&&(d+=c);return d},k.toggleCommentLines=function(a,b,c,d){console.log("toggle");var e=new g(0,0,0,0);for(var f=c;f<=d;++f){var h=b.getLine(f);if(n.test(h))continue;m.test(h)?h=h.replace(m,"$1"):h=h.replace(o,"$&#"),e.end.row=e.start.row=f,e.end.column=h.length+1,b.replace(e,h)}},k.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},k.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},b.Mode=j}),define("ace/mode/coffee_highlight_rules",function(a,b,c){function d(){var a="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",b="(?![$\\w]|\\s*:)",c={token:"string",regex:".+"};this.$rules={start:[{token:"identifier",regex:"(?:@|(?:\\.|::)\\s*)"+a},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof)|s(?:uper|witch)|return|b(?:reak|y)|c(?:ontinue|atch|lass)|i(?:n(?:stanceof)?|s(?:nt)?|f)|e(?:lse|xtends)|f(?:or (?:own)?|inally|unction)|wh(?:ile|en)|n(?:ew|ot?)|d(?:e(?:lete|bugger)|o)|loop|o(?:ff?|[rn])|un(?:less|til)|and|yes)"+b},{token:"constant.language",regex:"(?:true|false|null|undefined)"+b},{token:"invalid.illegal",regex:"(?:c(?:ase|onst)|default|function|v(?:ar|oid)|with|e(?:num|xport)|i(?:mplements|nterface)|let|p(?:ackage|r(?:ivate|otected)|ublic)|static|yield|__(?:hasProp|extends|slice|bind|indexOf))"+b},{token:"language.support.class",regex:"(?:Array|Boolean|Date|Function|Number|Object|R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|TypeError|URIError)"+b},{token:"language.support.function",regex:"(?:Math|JSON|is(?:NaN|Finite)|parse(?:Int|Float)|encodeURI(?:Component)?|decodeURI(?:Component)?)"+b},{token:"identifier",regex:a},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{token:"string",regex:"'''",next:"qdoc"},{token:"string",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:"/(?!\\s)[^[/\\n\\\\]*(?: (?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[/\\n\\\\]*)*/[imgy]{0,4}(?!\\w)"},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:"lparen",regex:"[({[]"},{token:"rparen",regex:"[\\]})]"},{token:"keyword.operator",regex:"\\S+"},{token:"text",regex:"\\s+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},c],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},c],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"start"},c],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"start"},c],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"start"},c],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:".*?###",next:"start"},{token:"comment",regex:".+"}]}}a("pilot/oop").inherits(d,a("ace/mode/text_highlight_rules").TextHighlightRules),b.CoffeeHighlightRules=d}) define("ace/mode/coffee",["require","exports","module","ace/tokenizer","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","pilot/oop"],function(a,b,c){function j(){this.$tokenizer=new d((new e).getRules()),this.$outdent=new f}var d=a("ace/tokenizer").Tokenizer,e=a("ace/mode/coffee_highlight_rules").CoffeeHighlightRules,f=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=a("ace/range").Range,h=a("ace/mode/text").Mode,i=a("pilot/oop");i.inherits(j,h);var k=j.prototype,l=/(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/,m=/^(\s*)#/,n=/^\s*###(?!#)/,o=/^\s*/;k.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;(!e.length||e[e.length-1].type!=="comment")&&a==="start"&&l.test(b)&&(d+=c);return d},k.toggleCommentLines=function(a,b,c,d){console.log("toggle");var e=new g(0,0,0,0);for(var f=c;f<=d;++f){var h=b.getLine(f);if(n.test(h))continue;m.test(h)?h=h.replace(m,"$1"):h=h.replace(o,"$&#"),e.end.row=e.start.row=f,e.end.column=h.length+1,b.replace(e,h)}},k.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},k.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},b.Mode=j}),define("ace/mode/coffee_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){function d(){var a="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",b="(?![$\\w]|\\s*:)",c={token:"string",regex:".+"};this.$rules={start:[{token:"identifier",regex:"(?:@|(?:\\.|::)\\s*)"+a},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof)|s(?:uper|witch)|return|b(?:reak|y)|c(?:ontinue|atch|lass)|i(?:n(?:stanceof)?|s(?:nt)?|f)|e(?:lse|xtends)|f(?:or (?:own)?|inally|unction)|wh(?:ile|en)|n(?:ew|ot?)|d(?:e(?:lete|bugger)|o)|loop|o(?:ff?|[rn])|un(?:less|til)|and|yes)"+b},{token:"constant.language",regex:"(?:true|false|null|undefined)"+b},{token:"invalid.illegal",regex:"(?:c(?:ase|onst)|default|function|v(?:ar|oid)|with|e(?:num|xport)|i(?:mplements|nterface)|let|p(?:ackage|r(?:ivate|otected)|ublic)|static|yield|__(?:hasProp|extends|slice|bind|indexOf))"+b},{token:"language.support.class",regex:"(?:Array|Boolean|Date|Function|Number|Object|R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|TypeError|URIError)"+b},{token:"language.support.function",regex:"(?:Math|JSON|is(?:NaN|Finite)|parse(?:Int|Float)|encodeURI(?:Component)?|decodeURI(?:Component)?)"+b},{token:"identifier",regex:a},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{token:"string",regex:"'''",next:"qdoc"},{token:"string",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:"/(?!\\s)[^[/\\n\\\\]*(?: (?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[/\\n\\\\]*)*/[imgy]{0,4}(?!\\w)"},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:"lparen",regex:"[({[]"},{token:"rparen",regex:"[\\]})]"},{token:"keyword.operator",regex:"\\S+"},{token:"text",regex:"\\s+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},c],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},c],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"start"},c],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"start"},c],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"start"},c],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:".*?###",next:"start"},{token:"comment",regex:".+"}]}}a("pilot/oop").inherits(d,a("ace/mode/text_highlight_rules").TextHighlightRules),b.CoffeeHighlightRules=d})

1
build/src/mode-csharp.js Normal file
View file

@ -0,0 +1 @@
define("ace/mode/csharp",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/csharp_highlight_rules").CSharpHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(i,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){return null}}.call(i.prototype),b.Mode=i}),define("ace/mode/csharp_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=new f,b=e.arrayToMap("abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic".split("|")),c=e.arrayToMap("null|true|false".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},a.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"comment",regex:"\\/\\*\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(a){return a=="this"?"variable.language":b.hasOwnProperty(a)?"keyword":c.hasOwnProperty(a)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]},this.addRules(a.getRules(),"doc-"),this.$rules["doc-start"][0].next="start"};d.inherits(h,g),b.CSharpHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc",regex:"\\*\\/",next:"start"},{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",regex:"s+"},{token:"comment.doc",regex:"TODO"},{token:"comment.doc",regex:"[^@\\*]+"},{token:"comment.doc",regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
define("ace/mode/perl",function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/perl_highlight_rules").PerlHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/perl_highlight_rules",function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars".split("|")),b=e.arrayToMap("ARGV|ENV|INC|SIG".split("|")),c=e.arrayToMap("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};d.inherits(g,f),b.PerlHighlightRules=g}) define("ace/mode/perl",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/perl_highlight_rules").PerlHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/perl_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars".split("|")),b=e.arrayToMap("ARGV|ENV|INC|SIG".split("|")),c=e.arrayToMap("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};d.inherits(g,f),b.PerlHighlightRules=g})

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
define("ace/mode/python",function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/python_highlight_rules").PythonHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/python_highlight_rules",function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")),b=e.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")),c=e.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),d=e.arrayToMap("".split("|")),f="(?:r|u|ur|R|U|UR|Ur|uR)?",g="(?:(?:[1-9]\\d*)|(?:0))",h="(?:0[oO]?[0-7]+)",i="(?:0[xX][\\dA-Fa-f]+)",j="(?:0[bB][01]+)",k="(?:"+g+"|"+h+"|"+i+"|"+j+")",l="(?:[eE][+-]?\\d+)",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:(?:"+o+"|"+n+")"+l+")",q="(?:"+p+"|"+o+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",regex:f+'"{3}.*$',next:"qqstring"},{token:"string",regex:f+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:f+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",regex:f+"'{3}.*$",next:"qstring"},{token:"string",regex:f+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+q+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:q},{token:"constant.numeric",regex:k+"[lL]\\b"},{token:"constant.numeric",regex:k+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"invalid.illegal":c.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen",regex:"[\\[\\(\\{]"},{token:"rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",regex:".+"}]}};d.inherits(g,f),b.PythonHighlightRules=g}) define("ace/mode/python",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/python_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/python_highlight_rules").PythonHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/python_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")),b=e.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")),c=e.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),d=e.arrayToMap("".split("|")),f="(?:r|u|ur|R|U|UR|Ur|uR)?",g="(?:(?:[1-9]\\d*)|(?:0))",h="(?:0[oO]?[0-7]+)",i="(?:0[xX][\\dA-Fa-f]+)",j="(?:0[bB][01]+)",k="(?:"+g+"|"+h+"|"+i+"|"+j+")",l="(?:[eE][+-]?\\d+)",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:(?:"+o+"|"+n+")"+l+")",q="(?:"+p+"|"+o+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",regex:f+'"{3}.*$',next:"qqstring"},{token:"string",regex:f+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:f+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",regex:f+"'{3}.*$",next:"qstring"},{token:"string",regex:f+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+q+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:q},{token:"constant.numeric",regex:k+"[lL]\\b"},{token:"constant.numeric",regex:k+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"invalid.illegal":c.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen",regex:"[\\[\\(\\{]"},{token:"rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",regex:".+"}]}};d.inherits(g,f),b.PythonHighlightRules=g})

View file

@ -1 +1 @@
define("ace/mode/ruby",function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/ruby_highlight_rules").RubyHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/ruby_highlight_rules",function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("abort|Array|at_exit|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|eval|exec|exit|exit!fail|Float|fork|format|gets|global_variables|gsub|gsub!|Integer|lambda|load|local_variables|loop|open|p|print|printf|proc|putc|puts|raise|rand|readline|readlines|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan".split("|")),b=e.arrayToMap("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|if|in|__LINE__|module|next|not|or|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield".split("|")),c=e.arrayToMap("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING".split("|")),d=e.arrayToMap("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin$",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="self"?"variable.language":b.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"variable.language":a.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",regex:".+"}]}};d.inherits(g,f),b.RubyHighlightRules=g}) define("ace/mode/ruby",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/ruby_highlight_rules").RubyHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/ruby_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("abort|Array|at_exit|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|eval|exec|exit|exit!fail|Float|fork|format|gets|global_variables|gsub|gsub!|Integer|lambda|load|local_variables|loop|open|p|print|printf|proc|putc|puts|raise|rand|readline|readlines|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan".split("|")),b=e.arrayToMap("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|if|in|__LINE__|module|next|not|or|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield".split("|")),c=e.arrayToMap("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING".split("|")),d=e.arrayToMap("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin$",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="self"?"variable.language":b.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"variable.language":a.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",regex:".+"}]}};d.inherits(g,f),b.RubyHighlightRules=g})

View file

@ -1 +1 @@
define("ace/mode/xml",function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/xml_highlight_rules").XmlHighlightRules,h=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(h.prototype),b.Mode=h}),define("ace/mode/xml_highlight_rules",function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",regex:"<\\!--",next:"comment"},{token:"text",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],tag:[{token:"text",regex:">",next:"start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",regex:".+"}]}};d.inherits(f,e),b.XmlHighlightRules=f}) define("ace/mode/xml",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/xml_highlight_rules").XmlHighlightRules,h=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(h.prototype),b.Mode=h}),define("ace/mode/xml_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",regex:"<\\!--",next:"comment"},{token:"text",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],tag:[{token:"text",regex:">",next:"start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",regex:".+"}]}};d.inherits(f,e),b.XmlHighlightRules=f})

View file

@ -1 +1 @@
define("ace/theme/clouds",function(a,b,c){var d=a("pilot/dom"),e=".ace-clouds .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-clouds .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-clouds .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-clouds .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-clouds .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-clouds .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-clouds .ace_scroller {\n background-color: #FFFFFF;\n}\n\n.ace-clouds .ace_text-layer {\n cursor: text;\n color: #000000;\n}\n\n.ace-clouds .ace_cursor {\n border-left: 2px solid #000000;\n}\n\n.ace-clouds .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #000000;\n}\n \n.ace-clouds .ace_marker-layer .ace_selection {\n background: #BDD5FC;\n}\n\n.ace-clouds .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-clouds .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF;\n}\n\n.ace-clouds .ace_marker-layer .ace_active_line {\n background: #FFFBD1;\n}\n\n \n.ace-clouds .ace_invisible {\n color: #BFBFBF;\n}\n\n.ace-clouds .ace_keyword {\n color:#AF956F;\n}\n\n.ace-clouds .ace_keyword.ace_operator {\n color:#484848;\n}\n\n.ace-clouds .ace_constant {\n \n}\n\n.ace-clouds .ace_constant.ace_language {\n color:#39946A;\n}\n\n.ace-clouds .ace_constant.ace_library {\n \n}\n\n.ace-clouds .ace_constant.ace_numeric {\n color:#46A609;\n}\n\n.ace-clouds .ace_invalid {\n background-color:#FF002A;\n}\n\n.ace-clouds .ace_invalid.ace_illegal {\n \n}\n\n.ace-clouds .ace_invalid.ace_deprecated {\n \n}\n\n.ace-clouds .ace_support {\n \n}\n\n.ace-clouds .ace_support.ace_function {\n color:#C52727;\n}\n\n.ace-clouds .ace_function.ace_buildin {\n \n}\n\n.ace-clouds .ace_string {\n color:#5D90CD;\n}\n\n.ace-clouds .ace_string.ace_regexp {\n \n}\n\n.ace-clouds .ace_comment {\n color:#BCC8BA;\n}\n\n.ace-clouds .ace_comment.ace_doc {\n \n}\n\n.ace-clouds .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-clouds .ace_variable {\n \n}\n\n.ace-clouds .ace_variable.ace_language {\n \n}\n\n.ace-clouds .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-clouds"}) define("ace/theme/clouds",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-clouds .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-clouds .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-clouds .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-clouds .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-clouds .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-clouds .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-clouds .ace_scroller {\n background-color: #FFFFFF;\n}\n\n.ace-clouds .ace_text-layer {\n cursor: text;\n color: #000000;\n}\n\n.ace-clouds .ace_cursor {\n border-left: 2px solid #000000;\n}\n\n.ace-clouds .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #000000;\n}\n \n.ace-clouds .ace_marker-layer .ace_selection {\n background: #BDD5FC;\n}\n\n.ace-clouds .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-clouds .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF;\n}\n\n.ace-clouds .ace_marker-layer .ace_active_line {\n background: #FFFBD1;\n}\n\n \n.ace-clouds .ace_invisible {\n color: #BFBFBF;\n}\n\n.ace-clouds .ace_keyword {\n color:#AF956F;\n}\n\n.ace-clouds .ace_keyword.ace_operator {\n color:#484848;\n}\n\n.ace-clouds .ace_constant {\n \n}\n\n.ace-clouds .ace_constant.ace_language {\n color:#39946A;\n}\n\n.ace-clouds .ace_constant.ace_library {\n \n}\n\n.ace-clouds .ace_constant.ace_numeric {\n color:#46A609;\n}\n\n.ace-clouds .ace_invalid {\n background-color:#FF002A;\n}\n\n.ace-clouds .ace_invalid.ace_illegal {\n \n}\n\n.ace-clouds .ace_invalid.ace_deprecated {\n \n}\n\n.ace-clouds .ace_support {\n \n}\n\n.ace-clouds .ace_support.ace_function {\n color:#C52727;\n}\n\n.ace-clouds .ace_function.ace_buildin {\n \n}\n\n.ace-clouds .ace_string {\n color:#5D90CD;\n}\n\n.ace-clouds .ace_string.ace_regexp {\n \n}\n\n.ace-clouds .ace_comment {\n color:#BCC8BA;\n}\n\n.ace-clouds .ace_comment.ace_doc {\n \n}\n\n.ace-clouds .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-clouds .ace_variable {\n \n}\n\n.ace-clouds .ace_variable.ace_language {\n \n}\n\n.ace-clouds .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-clouds"})

View file

@ -1 +1 @@
define("ace/theme/clouds_midnight",function(a,b,c){var d=a("pilot/dom"),e=".ace-clouds-midnight .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-clouds-midnight .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-clouds-midnight .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-clouds-midnight .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-clouds-midnight .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-clouds-midnight .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-clouds-midnight .ace_scroller {\n background-color: #191919;\n}\n\n.ace-clouds-midnight .ace_text-layer {\n cursor: text;\n color: #929292;\n}\n\n.ace-clouds-midnight .ace_cursor {\n border-left: 2px solid #7DA5DC;\n}\n\n.ace-clouds-midnight .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #7DA5DC;\n}\n \n.ace-clouds-midnight .ace_marker-layer .ace_selection {\n background: #000000;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_active_line {\n background: rgba(215, 215, 215, 0.031);\n}\n\n \n.ace-clouds-midnight .ace_invisible {\n color: #BFBFBF;\n}\n\n.ace-clouds-midnight .ace_keyword {\n color:#927C5D;\n}\n\n.ace-clouds-midnight .ace_keyword.ace_operator {\n color:#4B4B4B;\n}\n\n.ace-clouds-midnight .ace_constant {\n \n}\n\n.ace-clouds-midnight .ace_constant.ace_language {\n color:#39946A;\n}\n\n.ace-clouds-midnight .ace_constant.ace_library {\n \n}\n\n.ace-clouds-midnight .ace_constant.ace_numeric {\n color:#46A609;\n}\n\n.ace-clouds-midnight .ace_invalid {\n color:#FFFFFF;\nbackground-color:#E92E2E;\n}\n\n.ace-clouds-midnight .ace_invalid.ace_illegal {\n \n}\n\n.ace-clouds-midnight .ace_invalid.ace_deprecated {\n \n}\n\n.ace-clouds-midnight .ace_support {\n \n}\n\n.ace-clouds-midnight .ace_support.ace_function {\n color:#E92E2E;\n}\n\n.ace-clouds-midnight .ace_function.ace_buildin {\n \n}\n\n.ace-clouds-midnight .ace_string {\n color:#5D90CD;\n}\n\n.ace-clouds-midnight .ace_string.ace_regexp {\n \n}\n\n.ace-clouds-midnight .ace_comment {\n color:#3C403B;\n}\n\n.ace-clouds-midnight .ace_comment.ace_doc {\n \n}\n\n.ace-clouds-midnight .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-clouds-midnight .ace_variable {\n \n}\n\n.ace-clouds-midnight .ace_variable.ace_language {\n \n}\n\n.ace-clouds-midnight .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-clouds-midnight"}) define("ace/theme/clouds_midnight",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-clouds-midnight .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-clouds-midnight .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-clouds-midnight .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-clouds-midnight .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-clouds-midnight .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-clouds-midnight .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-clouds-midnight .ace_scroller {\n background-color: #191919;\n}\n\n.ace-clouds-midnight .ace_text-layer {\n cursor: text;\n color: #929292;\n}\n\n.ace-clouds-midnight .ace_cursor {\n border-left: 2px solid #7DA5DC;\n}\n\n.ace-clouds-midnight .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #7DA5DC;\n}\n \n.ace-clouds-midnight .ace_marker-layer .ace_selection {\n background: #000000;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_active_line {\n background: rgba(215, 215, 215, 0.031);\n}\n\n \n.ace-clouds-midnight .ace_invisible {\n color: #BFBFBF;\n}\n\n.ace-clouds-midnight .ace_keyword {\n color:#927C5D;\n}\n\n.ace-clouds-midnight .ace_keyword.ace_operator {\n color:#4B4B4B;\n}\n\n.ace-clouds-midnight .ace_constant {\n \n}\n\n.ace-clouds-midnight .ace_constant.ace_language {\n color:#39946A;\n}\n\n.ace-clouds-midnight .ace_constant.ace_library {\n \n}\n\n.ace-clouds-midnight .ace_constant.ace_numeric {\n color:#46A609;\n}\n\n.ace-clouds-midnight .ace_invalid {\n color:#FFFFFF;\nbackground-color:#E92E2E;\n}\n\n.ace-clouds-midnight .ace_invalid.ace_illegal {\n \n}\n\n.ace-clouds-midnight .ace_invalid.ace_deprecated {\n \n}\n\n.ace-clouds-midnight .ace_support {\n \n}\n\n.ace-clouds-midnight .ace_support.ace_function {\n color:#E92E2E;\n}\n\n.ace-clouds-midnight .ace_function.ace_buildin {\n \n}\n\n.ace-clouds-midnight .ace_string {\n color:#5D90CD;\n}\n\n.ace-clouds-midnight .ace_string.ace_regexp {\n \n}\n\n.ace-clouds-midnight .ace_comment {\n color:#3C403B;\n}\n\n.ace-clouds-midnight .ace_comment.ace_doc {\n \n}\n\n.ace-clouds-midnight .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-clouds-midnight .ace_variable {\n \n}\n\n.ace-clouds-midnight .ace_variable.ace_language {\n \n}\n\n.ace-clouds-midnight .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-clouds-midnight"})

View file

@ -1 +1 @@
define("ace/theme/cobalt",function(a,b,c){var d=a("pilot/dom"),e=".ace-cobalt .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-cobalt .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-cobalt .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-cobalt .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-cobalt .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-cobalt .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-cobalt .ace_scroller {\n background-color: #002240;\n}\n\n.ace-cobalt .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-cobalt .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-cobalt .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-cobalt .ace_marker-layer .ace_selection {\n background: rgba(179, 101, 57, 0.75);\n}\n\n.ace-cobalt .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-cobalt .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.15);\n}\n\n.ace-cobalt .ace_marker-layer .ace_active_line {\n background: rgba(0, 0, 0, 0.35);\n}\n\n \n.ace-cobalt .ace_invisible {\n color: rgba(255, 255, 255, 0.15);\n}\n\n.ace-cobalt .ace_keyword {\n color:#FF9D00;\n}\n\n.ace-cobalt .ace_keyword.ace_operator {\n \n}\n\n.ace-cobalt .ace_constant {\n color:#FF628C;\n}\n\n.ace-cobalt .ace_constant.ace_language {\n \n}\n\n.ace-cobalt .ace_constant.ace_library {\n \n}\n\n.ace-cobalt .ace_constant.ace_numeric {\n \n}\n\n.ace-cobalt .ace_invalid {\n color:#F8F8F8;\nbackground-color:#800F00;\n}\n\n.ace-cobalt .ace_invalid.ace_illegal {\n \n}\n\n.ace-cobalt .ace_invalid.ace_deprecated {\n \n}\n\n.ace-cobalt .ace_support {\n color:#80FFBB;\n}\n\n.ace-cobalt .ace_support.ace_function {\n color:#FFB054;\n}\n\n.ace-cobalt .ace_function.ace_buildin {\n \n}\n\n.ace-cobalt .ace_string {\n \n}\n\n.ace-cobalt .ace_string.ace_regexp {\n color:#80FFC2;\n}\n\n.ace-cobalt .ace_comment {\n font-style:italic;\ncolor:#0088FF;\n}\n\n.ace-cobalt .ace_comment.ace_doc {\n \n}\n\n.ace-cobalt .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-cobalt .ace_variable {\n color:#CCCCCC;\n}\n\n.ace-cobalt .ace_variable.ace_language {\n color:#FF80E1;\n}\n\n.ace-cobalt .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-cobalt"}) define("ace/theme/cobalt",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-cobalt .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-cobalt .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-cobalt .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-cobalt .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-cobalt .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-cobalt .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-cobalt .ace_scroller {\n background-color: #002240;\n}\n\n.ace-cobalt .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-cobalt .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-cobalt .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-cobalt .ace_marker-layer .ace_selection {\n background: rgba(179, 101, 57, 0.75);\n}\n\n.ace-cobalt .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-cobalt .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.15);\n}\n\n.ace-cobalt .ace_marker-layer .ace_active_line {\n background: rgba(0, 0, 0, 0.35);\n}\n\n \n.ace-cobalt .ace_invisible {\n color: rgba(255, 255, 255, 0.15);\n}\n\n.ace-cobalt .ace_keyword {\n color:#FF9D00;\n}\n\n.ace-cobalt .ace_keyword.ace_operator {\n \n}\n\n.ace-cobalt .ace_constant {\n color:#FF628C;\n}\n\n.ace-cobalt .ace_constant.ace_language {\n \n}\n\n.ace-cobalt .ace_constant.ace_library {\n \n}\n\n.ace-cobalt .ace_constant.ace_numeric {\n \n}\n\n.ace-cobalt .ace_invalid {\n color:#F8F8F8;\nbackground-color:#800F00;\n}\n\n.ace-cobalt .ace_invalid.ace_illegal {\n \n}\n\n.ace-cobalt .ace_invalid.ace_deprecated {\n \n}\n\n.ace-cobalt .ace_support {\n color:#80FFBB;\n}\n\n.ace-cobalt .ace_support.ace_function {\n color:#FFB054;\n}\n\n.ace-cobalt .ace_function.ace_buildin {\n \n}\n\n.ace-cobalt .ace_string {\n \n}\n\n.ace-cobalt .ace_string.ace_regexp {\n color:#80FFC2;\n}\n\n.ace-cobalt .ace_comment {\n font-style:italic;\ncolor:#0088FF;\n}\n\n.ace-cobalt .ace_comment.ace_doc {\n \n}\n\n.ace-cobalt .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-cobalt .ace_variable {\n color:#CCCCCC;\n}\n\n.ace-cobalt .ace_variable.ace_language {\n color:#FF80E1;\n}\n\n.ace-cobalt .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-cobalt"})

View file

@ -1 +1 @@
define("ace/theme/dawn",function(a,b,c){var d=a("pilot/dom"),e=".ace-dawn .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-dawn .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-dawn .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-dawn .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-dawn .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-dawn .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-dawn .ace_scroller {\n background-color: #F9F9F9;\n}\n\n.ace-dawn .ace_text-layer {\n cursor: text;\n color: #080808;\n}\n\n.ace-dawn .ace_cursor {\n border-left: 2px solid #000000;\n}\n\n.ace-dawn .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #000000;\n}\n \n.ace-dawn .ace_marker-layer .ace_selection {\n background: rgba(39, 95, 255, 0.30);\n}\n\n.ace-dawn .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-dawn .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(75, 75, 126, 0.50);\n}\n\n.ace-dawn .ace_marker-layer .ace_active_line {\n background: rgba(36, 99, 180, 0.12);\n}\n\n \n.ace-dawn .ace_invisible {\n color: rgba(75, 75, 126, 0.50);\n}\n\n.ace-dawn .ace_keyword {\n color:#794938;\n}\n\n.ace-dawn .ace_keyword.ace_operator {\n \n}\n\n.ace-dawn .ace_constant {\n color:#811F24;\n}\n\n.ace-dawn .ace_constant.ace_language {\n \n}\n\n.ace-dawn .ace_constant.ace_library {\n \n}\n\n.ace-dawn .ace_constant.ace_numeric {\n \n}\n\n.ace-dawn .ace_invalid {\n \n}\n\n.ace-dawn .ace_invalid.ace_illegal {\n text-decoration:underline;\nfont-style:italic;\ncolor:#F8F8F8;\nbackground-color:#B52A1D;\n}\n\n.ace-dawn .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#B52A1D;\n}\n\n.ace-dawn .ace_support {\n color:#691C97;\n}\n\n.ace-dawn .ace_support.ace_function {\n color:#693A17;\n}\n\n.ace-dawn .ace_function.ace_buildin {\n \n}\n\n.ace-dawn .ace_string {\n color:#0B6125;\n}\n\n.ace-dawn .ace_string.ace_regexp {\n color:#CF5628;\n}\n\n.ace-dawn .ace_comment {\n font-style:italic;\ncolor:#5A525F;\n}\n\n.ace-dawn .ace_comment.ace_doc {\n \n}\n\n.ace-dawn .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-dawn .ace_variable {\n color:#234A97;\n}\n\n.ace-dawn .ace_variable.ace_language {\n \n}\n\n.ace-dawn .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-dawn"}) define("ace/theme/dawn",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-dawn .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-dawn .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-dawn .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-dawn .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-dawn .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-dawn .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-dawn .ace_scroller {\n background-color: #F9F9F9;\n}\n\n.ace-dawn .ace_text-layer {\n cursor: text;\n color: #080808;\n}\n\n.ace-dawn .ace_cursor {\n border-left: 2px solid #000000;\n}\n\n.ace-dawn .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #000000;\n}\n \n.ace-dawn .ace_marker-layer .ace_selection {\n background: rgba(39, 95, 255, 0.30);\n}\n\n.ace-dawn .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-dawn .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(75, 75, 126, 0.50);\n}\n\n.ace-dawn .ace_marker-layer .ace_active_line {\n background: rgba(36, 99, 180, 0.12);\n}\n\n \n.ace-dawn .ace_invisible {\n color: rgba(75, 75, 126, 0.50);\n}\n\n.ace-dawn .ace_keyword {\n color:#794938;\n}\n\n.ace-dawn .ace_keyword.ace_operator {\n \n}\n\n.ace-dawn .ace_constant {\n color:#811F24;\n}\n\n.ace-dawn .ace_constant.ace_language {\n \n}\n\n.ace-dawn .ace_constant.ace_library {\n \n}\n\n.ace-dawn .ace_constant.ace_numeric {\n \n}\n\n.ace-dawn .ace_invalid {\n \n}\n\n.ace-dawn .ace_invalid.ace_illegal {\n text-decoration:underline;\nfont-style:italic;\ncolor:#F8F8F8;\nbackground-color:#B52A1D;\n}\n\n.ace-dawn .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#B52A1D;\n}\n\n.ace-dawn .ace_support {\n color:#691C97;\n}\n\n.ace-dawn .ace_support.ace_function {\n color:#693A17;\n}\n\n.ace-dawn .ace_function.ace_buildin {\n \n}\n\n.ace-dawn .ace_string {\n color:#0B6125;\n}\n\n.ace-dawn .ace_string.ace_regexp {\n color:#CF5628;\n}\n\n.ace-dawn .ace_comment {\n font-style:italic;\ncolor:#5A525F;\n}\n\n.ace-dawn .ace_comment.ace_doc {\n \n}\n\n.ace-dawn .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-dawn .ace_variable {\n color:#234A97;\n}\n\n.ace-dawn .ace_variable.ace_language {\n \n}\n\n.ace-dawn .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-dawn"})

View file

@ -1 +1 @@
define("ace/theme/eclipse",function(a,b,c){var d=a("pilot/dom"),e=".ace-eclipse .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-eclipse .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-eclipse .ace_gutter {\n width: 50px;\n background: rgb(227, 227, 227);\n border-right: 1px solid rgb(159, 159, 159);\t \n color: rgb(136, 136, 136);\n}\n\n.ace-eclipse .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-eclipse .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-eclipse .ace_text-layer {\n cursor: text;\n}\n\n.ace-eclipse .ace_cursor {\n border-left: 1px solid black;\n}\n\n.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable {\n color: rgb(127, 0, 85);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-eclipse .ace_line .ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-eclipse .ace_line .ace_string {\n color: rgb(42, 0, 255);\n}\n\n.ace-eclipse .ace_line .ace_comment {\n color: rgb(63, 127, 95);\n}\n\n.ace-eclipse .ace_line .ace_comment.ace_doc {\n color: rgb(63, 95, 191);\n}\n\n.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(127, 159, 191);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_numeric {\n}\n\n.ace-eclipse .ace_line .ace_tag {\n\tcolor: rgb(63, 127, 127);\n}\n\n.ace-eclipse .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-eclipse .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-eclipse .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-eclipse .ace_marker-layer .ace_active_line {\n background: rgb(232, 242, 254);\n}";d.importCssString(e),b.cssClass="ace-eclipse"}) define("ace/theme/eclipse",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-eclipse .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-eclipse .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-eclipse .ace_gutter {\n width: 50px;\n background: rgb(227, 227, 227);\n border-right: 1px solid rgb(159, 159, 159);\t \n color: rgb(136, 136, 136);\n}\n\n.ace-eclipse .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-eclipse .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-eclipse .ace_text-layer {\n cursor: text;\n}\n\n.ace-eclipse .ace_cursor {\n border-left: 1px solid black;\n}\n\n.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable {\n color: rgb(127, 0, 85);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-eclipse .ace_line .ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-eclipse .ace_line .ace_string {\n color: rgb(42, 0, 255);\n}\n\n.ace-eclipse .ace_line .ace_comment {\n color: rgb(63, 127, 95);\n}\n\n.ace-eclipse .ace_line .ace_comment.ace_doc {\n color: rgb(63, 95, 191);\n}\n\n.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(127, 159, 191);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_numeric {\n}\n\n.ace-eclipse .ace_line .ace_tag {\n\tcolor: rgb(63, 127, 127);\n}\n\n.ace-eclipse .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-eclipse .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-eclipse .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-eclipse .ace_marker-layer .ace_active_line {\n background: rgb(232, 242, 254);\n}";d.importCssString(e),b.cssClass="ace-eclipse"})

View file

@ -1 +1 @@
define("ace/theme/idle_fingers",function(a,b,c){var d=a("pilot/dom"),e=".ace-idle-fingers .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-idle-fingers .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-idle-fingers .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-idle-fingers .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-idle-fingers .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-idle-fingers .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-idle-fingers .ace_scroller {\n background-color: #323232;\n}\n\n.ace-idle-fingers .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-idle-fingers .ace_cursor {\n border-left: 2px solid #91FF00;\n}\n\n.ace-idle-fingers .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #91FF00;\n}\n \n.ace-idle-fingers .ace_marker-layer .ace_selection {\n background: rgba(90, 100, 126, 0.88);\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404040;\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_active_line {\n background: #353637;\n}\n\n \n.ace-idle-fingers .ace_invisible {\n color: #404040;\n}\n\n.ace-idle-fingers .ace_keyword {\n color:#CC7833;\n}\n\n.ace-idle-fingers .ace_keyword.ace_operator {\n \n}\n\n.ace-idle-fingers .ace_constant {\n color:#6C99BB;\n}\n\n.ace-idle-fingers .ace_constant.ace_language {\n \n}\n\n.ace-idle-fingers .ace_constant.ace_library {\n \n}\n\n.ace-idle-fingers .ace_constant.ace_numeric {\n \n}\n\n.ace-idle-fingers .ace_invalid {\n color:#FFFFFF;\nbackground-color:#FF0000;\n}\n\n.ace-idle-fingers .ace_invalid.ace_illegal {\n \n}\n\n.ace-idle-fingers .ace_invalid.ace_deprecated {\n \n}\n\n.ace-idle-fingers .ace_support {\n color:#bc9458;\n}\n\n.ace-idle-fingers .ace_support.ace_function {\n color:#B83426;\n}\n\n.ace-idle-fingers .ace_function.ace_buildin {\n \n}\n\n.ace-idle-fingers .ace_string {\n color:#A5C261;\n}\n\n.ace-idle-fingers .ace_string.ace_regexp {\n color:#CCCC33;\n}\n\n.ace-idle-fingers .ace_comment {\n font-style:italic;\n color:#BC9458;\n}\n\n.ace-idle-fingers .ace_comment.ace_doc {\n \n}\n\n.ace-idle-fingers .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-idle-fingers .ace_variable {\n color:#b7dff8;\n}\n\n.ace-idle-fingers .ace_variable.ace_language {\n color:#b7dff8;\n}\n\n.ace-idle-fingers .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-idle-fingers"}) define("ace/theme/idle_fingers",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-idle-fingers .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-idle-fingers .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-idle-fingers .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-idle-fingers .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-idle-fingers .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-idle-fingers .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-idle-fingers .ace_scroller {\n background-color: #323232;\n}\n\n.ace-idle-fingers .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-idle-fingers .ace_cursor {\n border-left: 2px solid #91FF00;\n}\n\n.ace-idle-fingers .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #91FF00;\n}\n \n.ace-idle-fingers .ace_marker-layer .ace_selection {\n background: rgba(90, 100, 126, 0.88);\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404040;\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_active_line {\n background: #353637;\n}\n\n \n.ace-idle-fingers .ace_invisible {\n color: #404040;\n}\n\n.ace-idle-fingers .ace_keyword {\n color:#CC7833;\n}\n\n.ace-idle-fingers .ace_keyword.ace_operator {\n \n}\n\n.ace-idle-fingers .ace_constant {\n color:#6C99BB;\n}\n\n.ace-idle-fingers .ace_constant.ace_language {\n \n}\n\n.ace-idle-fingers .ace_constant.ace_library {\n \n}\n\n.ace-idle-fingers .ace_constant.ace_numeric {\n \n}\n\n.ace-idle-fingers .ace_invalid {\n color:#FFFFFF;\nbackground-color:#FF0000;\n}\n\n.ace-idle-fingers .ace_invalid.ace_illegal {\n \n}\n\n.ace-idle-fingers .ace_invalid.ace_deprecated {\n \n}\n\n.ace-idle-fingers .ace_support {\n \n}\n\n.ace-idle-fingers .ace_support.ace_function {\n color:#B83426;\n}\n\n.ace-idle-fingers .ace_function.ace_buildin {\n \n}\n\n.ace-idle-fingers .ace_string {\n color:#A5C261;\n}\n\n.ace-idle-fingers .ace_string.ace_regexp {\n color:#CCCC33;\n}\n\n.ace-idle-fingers .ace_comment {\n font-style:italic;\ncolor:#BC9458;\n}\n\n.ace-idle-fingers .ace_comment.ace_doc {\n \n}\n\n.ace-idle-fingers .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-idle-fingers .ace_variable {\n \n}\n\n.ace-idle-fingers .ace_variable.ace_language {\n \n}\n\n.ace-idle-fingers .ace_xml_pe {\n \n}\n\n.ace-idle-fingers .ace_collab.ace_user1 {\n color:#323232;\nbackground-color:#FFF980; \n}";d.importCssString(e),b.cssClass="ace-idle-fingers"})

View file

@ -1 +1 @@
define("ace/theme/kr_theme",function(a,b,c){var d=a("pilot/dom"),e=".ace-kr-theme .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-kr-theme .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-kr-theme .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-kr-theme .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-kr-theme .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-kr-theme .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-kr-theme .ace_scroller {\n background-color: #0B0A09;\n}\n\n.ace-kr-theme .ace_text-layer {\n cursor: text;\n color: #FCFFE0;\n}\n\n.ace-kr-theme .ace_cursor {\n border-left: 2px solid #FF9900;\n}\n\n.ace-kr-theme .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FF9900;\n}\n \n.ace-kr-theme .ace_marker-layer .ace_selection {\n background: rgba(170, 0, 255, 0.45);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 177, 111, 0.32);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_active_line {\n background: #38403D;\n}\n\n \n.ace-kr-theme .ace_invisible {\n color: rgba(255, 177, 111, 0.32);\n}\n\n.ace-kr-theme .ace_keyword {\n color:#949C8B;\n}\n\n.ace-kr-theme .ace_keyword.ace_operator {\n \n}\n\n.ace-kr-theme .ace_constant {\n color:rgba(210, 117, 24, 0.76);\n}\n\n.ace-kr-theme .ace_constant.ace_language {\n \n}\n\n.ace-kr-theme .ace_constant.ace_library {\n \n}\n\n.ace-kr-theme .ace_constant.ace_numeric {\n \n}\n\n.ace-kr-theme .ace_invalid {\n color:#F8F8F8;\nbackground-color:#A41300;\n}\n\n.ace-kr-theme .ace_invalid.ace_illegal {\n \n}\n\n.ace-kr-theme .ace_invalid.ace_deprecated {\n \n}\n\n.ace-kr-theme .ace_support {\n color:#9FC28A;\n}\n\n.ace-kr-theme .ace_support.ace_function {\n color:#85873A;\n}\n\n.ace-kr-theme .ace_function.ace_buildin {\n \n}\n\n.ace-kr-theme .ace_string {\n \n}\n\n.ace-kr-theme .ace_string.ace_regexp {\n color:rgba(125, 255, 192, 0.65);\n}\n\n.ace-kr-theme .ace_comment {\n font-style:italic;\ncolor:#706D5B;\n}\n\n.ace-kr-theme .ace_comment.ace_doc {\n \n}\n\n.ace-kr-theme .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-kr-theme .ace_variable {\n color:#D1A796;\n}\n\n.ace-kr-theme .ace_variable.ace_language {\n color:#FF80E1;\n}\n\n.ace-kr-theme .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-kr-theme"}) define("ace/theme/kr_theme",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-kr-theme .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-kr-theme .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-kr-theme .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-kr-theme .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-kr-theme .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-kr-theme .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-kr-theme .ace_scroller {\n background-color: #0B0A09;\n}\n\n.ace-kr-theme .ace_text-layer {\n cursor: text;\n color: #FCFFE0;\n}\n\n.ace-kr-theme .ace_cursor {\n border-left: 2px solid #FF9900;\n}\n\n.ace-kr-theme .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FF9900;\n}\n \n.ace-kr-theme .ace_marker-layer .ace_selection {\n background: rgba(170, 0, 255, 0.45);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 177, 111, 0.32);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_active_line {\n background: #38403D;\n}\n\n \n.ace-kr-theme .ace_invisible {\n color: rgba(255, 177, 111, 0.32);\n}\n\n.ace-kr-theme .ace_keyword {\n color:#949C8B;\n}\n\n.ace-kr-theme .ace_keyword.ace_operator {\n \n}\n\n.ace-kr-theme .ace_constant {\n color:rgba(210, 117, 24, 0.76);\n}\n\n.ace-kr-theme .ace_constant.ace_language {\n \n}\n\n.ace-kr-theme .ace_constant.ace_library {\n \n}\n\n.ace-kr-theme .ace_constant.ace_numeric {\n \n}\n\n.ace-kr-theme .ace_invalid {\n color:#F8F8F8;\nbackground-color:#A41300;\n}\n\n.ace-kr-theme .ace_invalid.ace_illegal {\n \n}\n\n.ace-kr-theme .ace_invalid.ace_deprecated {\n \n}\n\n.ace-kr-theme .ace_support {\n color:#9FC28A;\n}\n\n.ace-kr-theme .ace_support.ace_function {\n color:#85873A;\n}\n\n.ace-kr-theme .ace_function.ace_buildin {\n \n}\n\n.ace-kr-theme .ace_string {\n \n}\n\n.ace-kr-theme .ace_string.ace_regexp {\n color:rgba(125, 255, 192, 0.65);\n}\n\n.ace-kr-theme .ace_comment {\n font-style:italic;\ncolor:#706D5B;\n}\n\n.ace-kr-theme .ace_comment.ace_doc {\n \n}\n\n.ace-kr-theme .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-kr-theme .ace_variable {\n color:#D1A796;\n}\n\n.ace-kr-theme .ace_variable.ace_language {\n color:#FF80E1;\n}\n\n.ace-kr-theme .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-kr-theme"})

View file

@ -1 +1 @@
define("ace/theme/mono_industrial",function(a,b,c){var d=a("pilot/dom"),e=".ace-mono-industrial .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-mono-industrial .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-mono-industrial .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-mono-industrial .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-mono-industrial .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-mono-industrial .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-mono-industrial .ace_scroller {\n background-color: #222C28;\n}\n\n.ace-mono-industrial .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-mono-industrial .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-mono-industrial .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-mono-industrial .ace_marker-layer .ace_selection {\n background: rgba(145, 153, 148, 0.40);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(102, 108, 104, 0.50);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_active_line {\n background: rgba(12, 13, 12, 0.25);\n}\n\n \n.ace-mono-industrial .ace_invisible {\n color: rgba(102, 108, 104, 0.50);\n}\n\n.ace-mono-industrial .ace_keyword {\n color:#A39E64;\n}\n\n.ace-mono-industrial .ace_keyword.ace_operator {\n color:#A8B3AB;\n}\n\n.ace-mono-industrial .ace_constant {\n color:#E98800;\n}\n\n.ace-mono-industrial .ace_constant.ace_language {\n \n}\n\n.ace-mono-industrial .ace_constant.ace_library {\n \n}\n\n.ace-mono-industrial .ace_constant.ace_numeric {\n color:#E98800;\n}\n\n.ace-mono-industrial .ace_invalid {\n color:#FFFFFF;\nbackground-color:rgba(153, 0, 0, 0.68);\n}\n\n.ace-mono-industrial .ace_invalid.ace_illegal {\n \n}\n\n.ace-mono-industrial .ace_invalid.ace_deprecated {\n \n}\n\n.ace-mono-industrial .ace_support {\n \n}\n\n.ace-mono-industrial .ace_support.ace_function {\n color:#588E60;\n}\n\n.ace-mono-industrial .ace_function.ace_buildin {\n \n}\n\n.ace-mono-industrial .ace_string {\n \n}\n\n.ace-mono-industrial .ace_string.ace_regexp {\n \n}\n\n.ace-mono-industrial .ace_comment {\n color:#666C68;\nbackground-color:#151C19;\n}\n\n.ace-mono-industrial .ace_comment.ace_doc {\n \n}\n\n.ace-mono-industrial .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-mono-industrial .ace_variable {\n \n}\n\n.ace-mono-industrial .ace_variable.ace_language {\n color:#648BD2;\n}\n\n.ace-mono-industrial .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-mono-industrial"}) define("ace/theme/mono_industrial",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-mono-industrial .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-mono-industrial .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-mono-industrial .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-mono-industrial .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-mono-industrial .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-mono-industrial .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-mono-industrial .ace_scroller {\n background-color: #222C28;\n}\n\n.ace-mono-industrial .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-mono-industrial .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-mono-industrial .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-mono-industrial .ace_marker-layer .ace_selection {\n background: rgba(145, 153, 148, 0.40);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(102, 108, 104, 0.50);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_active_line {\n background: rgba(12, 13, 12, 0.25);\n}\n\n \n.ace-mono-industrial .ace_invisible {\n color: rgba(102, 108, 104, 0.50);\n}\n\n.ace-mono-industrial .ace_keyword {\n color:#A39E64;\n}\n\n.ace-mono-industrial .ace_keyword.ace_operator {\n color:#A8B3AB;\n}\n\n.ace-mono-industrial .ace_constant {\n color:#E98800;\n}\n\n.ace-mono-industrial .ace_constant.ace_language {\n \n}\n\n.ace-mono-industrial .ace_constant.ace_library {\n \n}\n\n.ace-mono-industrial .ace_constant.ace_numeric {\n color:#E98800;\n}\n\n.ace-mono-industrial .ace_invalid {\n color:#FFFFFF;\nbackground-color:rgba(153, 0, 0, 0.68);\n}\n\n.ace-mono-industrial .ace_invalid.ace_illegal {\n \n}\n\n.ace-mono-industrial .ace_invalid.ace_deprecated {\n \n}\n\n.ace-mono-industrial .ace_support {\n \n}\n\n.ace-mono-industrial .ace_support.ace_function {\n color:#588E60;\n}\n\n.ace-mono-industrial .ace_function.ace_buildin {\n \n}\n\n.ace-mono-industrial .ace_string {\n \n}\n\n.ace-mono-industrial .ace_string.ace_regexp {\n \n}\n\n.ace-mono-industrial .ace_comment {\n color:#666C68;\nbackground-color:#151C19;\n}\n\n.ace-mono-industrial .ace_comment.ace_doc {\n \n}\n\n.ace-mono-industrial .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-mono-industrial .ace_variable {\n \n}\n\n.ace-mono-industrial .ace_variable.ace_language {\n color:#648BD2;\n}\n\n.ace-mono-industrial .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-mono-industrial"})

View file

@ -1 +1 @@
define("ace/theme/monokai",function(a,b,c){var d=a("pilot/dom"),e=".ace-monokai .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-monokai .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-monokai .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-monokai .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-monokai .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-monokai .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-monokai .ace_scroller {\n background-color: #272822;\n}\n\n.ace-monokai .ace_text-layer {\n cursor: text;\n color: #F8F8F2;\n}\n\n.ace-monokai .ace_cursor {\n border-left: 2px solid #F8F8F0;\n}\n\n.ace-monokai .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #F8F8F0;\n}\n \n.ace-monokai .ace_marker-layer .ace_selection {\n background: #49483E;\n}\n\n.ace-monokai .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-monokai .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E;\n}\n\n.ace-monokai .ace_marker-layer .ace_active_line {\n background: #49483E;\n}\n\n \n.ace-monokai .ace_invisible {\n color: #49483E;\n}\n\n.ace-monokai .ace_keyword {\n color:#F92672;\n}\n\n.ace-monokai .ace_keyword.ace_operator {\n \n}\n\n.ace-monokai .ace_constant {\n \n}\n\n.ace-monokai .ace_constant.ace_language {\n color:#AE81FF;\n}\n\n.ace-monokai .ace_constant.ace_library {\n \n}\n\n.ace-monokai .ace_constant.ace_numeric {\n color:#AE81FF;\n}\n\n.ace-monokai .ace_invalid {\n color:#F8F8F0;\nbackground-color:#F92672;\n}\n\n.ace-monokai .ace_invalid.ace_illegal {\n \n}\n\n.ace-monokai .ace_invalid.ace_deprecated {\n color:#F8F8F0;\nbackground-color:#AE81FF;\n}\n\n.ace-monokai .ace_support {\n \n}\n\n.ace-monokai .ace_support.ace_function {\n color:#66D9EF;\n}\n\n.ace-monokai .ace_function.ace_buildin {\n \n}\n\n.ace-monokai .ace_string {\n color:#E6DB74;\n}\n\n.ace-monokai .ace_string.ace_regexp {\n \n}\n\n.ace-monokai .ace_comment {\n color:#75715E;\n}\n\n.ace-monokai .ace_comment.ace_doc {\n \n}\n\n.ace-monokai .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-monokai .ace_variable {\n \n}\n\n.ace-monokai .ace_variable.ace_language {\n \n}\n\n.ace-monokai .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-monokai"}) define("ace/theme/monokai",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-monokai .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-monokai .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-monokai .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-monokai .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-monokai .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-monokai .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-monokai .ace_scroller {\n background-color: #272822;\n}\n\n.ace-monokai .ace_text-layer {\n cursor: text;\n color: #F8F8F2;\n}\n\n.ace-monokai .ace_cursor {\n border-left: 2px solid #F8F8F0;\n}\n\n.ace-monokai .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #F8F8F0;\n}\n \n.ace-monokai .ace_marker-layer .ace_selection {\n background: #49483E;\n}\n\n.ace-monokai .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-monokai .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E;\n}\n\n.ace-monokai .ace_marker-layer .ace_active_line {\n background: #49483E;\n}\n\n \n.ace-monokai .ace_invisible {\n color: #49483E;\n}\n\n.ace-monokai .ace_keyword {\n color:#F92672;\n}\n\n.ace-monokai .ace_keyword.ace_operator {\n \n}\n\n.ace-monokai .ace_constant {\n \n}\n\n.ace-monokai .ace_constant.ace_language {\n color:#AE81FF;\n}\n\n.ace-monokai .ace_constant.ace_library {\n \n}\n\n.ace-monokai .ace_constant.ace_numeric {\n color:#AE81FF;\n}\n\n.ace-monokai .ace_invalid {\n color:#F8F8F0;\nbackground-color:#F92672;\n}\n\n.ace-monokai .ace_invalid.ace_illegal {\n \n}\n\n.ace-monokai .ace_invalid.ace_deprecated {\n color:#F8F8F0;\nbackground-color:#AE81FF;\n}\n\n.ace-monokai .ace_support {\n \n}\n\n.ace-monokai .ace_support.ace_function {\n color:#66D9EF;\n}\n\n.ace-monokai .ace_function.ace_buildin {\n \n}\n\n.ace-monokai .ace_string {\n color:#E6DB74;\n}\n\n.ace-monokai .ace_string.ace_regexp {\n \n}\n\n.ace-monokai .ace_comment {\n color:#75715E;\n}\n\n.ace-monokai .ace_comment.ace_doc {\n \n}\n\n.ace-monokai .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-monokai .ace_variable {\n \n}\n\n.ace-monokai .ace_variable.ace_language {\n \n}\n\n.ace-monokai .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-monokai"})

View file

@ -1 +1 @@
define("ace/theme/pastel_on_dark",function(a,b,c){var d=a("pilot/dom"),e=".ace-pastel-on-dark .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-pastel-on-dark .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-pastel-on-dark .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-pastel-on-dark .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-pastel-on-dark .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-pastel-on-dark .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-pastel-on-dark .ace_scroller {\n background-color: #2c2828;\n}\n\n.ace-pastel-on-dark .ace_text-layer {\n cursor: text;\n color: #8f938f;\n}\n\n.ace-pastel-on-dark .ace_cursor {\n border-left: 2px solid #A7A7A7;\n}\n\n.ace-pastel-on-dark .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #A7A7A7;\n}\n \n.ace-pastel-on-dark .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_active_line {\n background: rgba(255, 255, 255, 0.031);\n}\n\n \n.ace-pastel-on-dark .ace_invisible {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.ace-pastel-on-dark .ace_keyword {\n color:#757ad8;\n}\n\n.ace-pastel-on-dark .ace_keyword.ace_operator {\n color:#797878;\n}\n\n.ace-pastel-on-dark .ace_constant {\n color:#4fb7c5;\n}\n\n.ace-pastel-on-dark .ace_constant.ace_language {\n \n}\n\n.ace-pastel-on-dark .ace_constant.ace_library {\n \n}\n\n.ace-pastel-on-dark .ace_constant.ace_numeric {\n \n}\n\n.ace-pastel-on-dark .ace_invalid {\n \n}\n\n.ace-pastel-on-dark .ace_invalid.ace_illegal {\n color:#F8F8F8;\nbackground-color:rgba(86, 45, 86, 0.75);\n}\n\n.ace-pastel-on-dark .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#D2A8A1;\n}\n\n.ace-pastel-on-dark .ace_support {\n color:#9a9a9a;\n}\n\n.ace-pastel-on-dark .ace_support.ace_function {\n color:#aeb2f8;\n}\n\n.ace-pastel-on-dark .ace_function.ace_buildin {\n \n}\n\n.ace-pastel-on-dark .ace_string {\n color:#66a968;\n}\n\n.ace-pastel-on-dark .ace_string.ace_regexp {\n color:#E9C062;\n}\n\n.ace-pastel-on-dark .ace_comment {\n color:#656865;\n}\n\n.ace-pastel-on-dark .ace_comment.ace_doc {\n color:A6C6FF;\n}\n\n.ace-pastel-on-dark .ace_comment.ace_doc.ace_tag {\n color:A6C6FF;\n}\n\n.ace-pastel-on-dark .ace_variable {\n color:#bebf55;\n}\n\n.ace-pastel-on-dark .ace_variable.ace_language {\n color:#bebf55;\n}\n\n.ace-pastel-on-dark .ace_xml_pe {\n color:#494949;\n}";d.importCssString(e),b.cssClass="ace-pastel-on-dark"}) define("ace/theme/pastel_on_dark",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-pastel-on-dark .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-pastel-on-dark .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-pastel-on-dark .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-pastel-on-dark .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-pastel-on-dark .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-pastel-on-dark .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-pastel-on-dark .ace_scroller {\n background-color: #2c2828;\n}\n\n.ace-pastel-on-dark .ace_text-layer {\n cursor: text;\n color: #8f938f;\n}\n\n.ace-pastel-on-dark .ace_cursor {\n border-left: 2px solid #A7A7A7;\n}\n\n.ace-pastel-on-dark .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #A7A7A7;\n}\n \n.ace-pastel-on-dark .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_active_line {\n background: rgba(255, 255, 255, 0.031);\n}\n\n \n.ace-pastel-on-dark .ace_invisible {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.ace-pastel-on-dark .ace_keyword {\n color:#757ad8;\n}\n\n.ace-pastel-on-dark .ace_keyword.ace_operator {\n color:#797878;\n}\n\n.ace-pastel-on-dark .ace_constant {\n color:#4fb7c5;\n}\n\n.ace-pastel-on-dark .ace_constant.ace_language {\n \n}\n\n.ace-pastel-on-dark .ace_constant.ace_library {\n \n}\n\n.ace-pastel-on-dark .ace_constant.ace_numeric {\n \n}\n\n.ace-pastel-on-dark .ace_invalid {\n \n}\n\n.ace-pastel-on-dark .ace_invalid.ace_illegal {\n color:#F8F8F8;\nbackground-color:rgba(86, 45, 86, 0.75);\n}\n\n.ace-pastel-on-dark .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#D2A8A1;\n}\n\n.ace-pastel-on-dark .ace_support {\n color:#9a9a9a;\n}\n\n.ace-pastel-on-dark .ace_support.ace_function {\n color:#aeb2f8;\n}\n\n.ace-pastel-on-dark .ace_function.ace_buildin {\n \n}\n\n.ace-pastel-on-dark .ace_string {\n color:#66a968;\n}\n\n.ace-pastel-on-dark .ace_string.ace_regexp {\n color:#E9C062;\n}\n\n.ace-pastel-on-dark .ace_comment {\n color:#656865;\n}\n\n.ace-pastel-on-dark .ace_comment.ace_doc {\n color:A6C6FF;\n}\n\n.ace-pastel-on-dark .ace_comment.ace_doc.ace_tag {\n color:A6C6FF;\n}\n\n.ace-pastel-on-dark .ace_variable {\n color:#bebf55;\n}\n\n.ace-pastel-on-dark .ace_variable.ace_language {\n color:#bebf55;\n}\n\n.ace-pastel-on-dark .ace_xml_pe {\n color:#494949;\n}";d.importCssString(e),b.cssClass="ace-pastel-on-dark"})

View file

@ -1 +1 @@
define("ace/theme/twilight",function(a,b,c){var d=a("pilot/dom"),e=".ace-twilight .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-twilight .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-twilight .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-twilight .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-twilight .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-twilight .ace_print_margin {\n border-left: 1px solid #3C3C3C;\n width: 100%;\n background: #242424;\n}\n\n.ace-twilight .ace_scroller {\n background-color: #141414;\n}\n\n.ace-twilight .ace_text-layer {\n cursor: text;\n color: #F8F8F8;\n}\n\n.ace-twilight .ace_cursor {\n border-left: 2px solid #A7A7A7;\n}\n\n.ace-twilight .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #A7A7A7;\n}\n.ace-twilight.normal-mode .ace_cursor.ace_overwrite {\n border: 1px solid #FFE300;\n background: #766B13;\n}\n.ace-twilight.normal-mode .ace_cursor-layer {\n z-index: 0;\n}\n \n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20);\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25);\n}\n\n.ace-twilight .ace_marker-layer .ace_active_line {\n background: rgba(255, 255, 255, 0.031);\n}\n\n \n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.ace-twilight .ace_keyword {\n color:#CDA869;\n}\n\n.ace-twilight .ace_keyword.ace_operator {\n \n}\n\n.ace-twilight .ace_constant {\n color:#CF6A4C;\n}\n\n.ace-twilight .ace_constant.ace_language {\n \n}\n\n.ace-twilight .ace_constant.ace_library {\n \n}\n\n.ace-twilight .ace_constant.ace_numeric {\n \n}\n\n.ace-twilight .ace_invalid {\n \n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color:#F8F8F8;\nbackground-color:rgba(86, 45, 86, 0.75);\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#D2A8A1;\n}\n\n.ace-twilight .ace_support {\n color:#9B859D;\n}\n\n.ace-twilight .ace_support.ace_function {\n color:#DAD085;\n}\n\n.ace-twilight .ace_function.ace_buildin {\n \n}\n\n.ace-twilight .ace_string {\n color:#8F9D6A;\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color:#E9C062;\n}\n\n.ace-twilight .ace_comment {\n font-style:italic;\ncolor:#5F5A60;\n}\n\n.ace-twilight .ace_comment.ace_doc {\n \n}\n\n.ace-twilight .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-twilight .ace_variable {\n color:#7587A6;\n}\n\n.ace-twilight .ace_variable.ace_language {\n \n}\n\n.ace-twilight .ace_xml_pe {\n color:#494949;\n}";d.importCssString(e),b.cssClass="ace-twilight"}) define("ace/theme/twilight",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-twilight .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-twilight .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-twilight .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-twilight .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-twilight .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-twilight .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-twilight .ace_scroller {\n background-color: #141414;\n}\n\n.ace-twilight .ace_text-layer {\n cursor: text;\n color: #F8F8F8;\n}\n\n.ace-twilight .ace_cursor {\n border-left: 2px solid #A7A7A7;\n}\n\n.ace-twilight .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #A7A7A7;\n}\n \n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20);\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25);\n}\n\n.ace-twilight .ace_marker-layer .ace_active_line {\n background: rgba(255, 255, 255, 0.031);\n}\n\n \n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.ace-twilight .ace_keyword {\n color:#CDA869;\n}\n\n.ace-twilight .ace_keyword.ace_operator {\n \n}\n\n.ace-twilight .ace_constant {\n color:#CF6A4C;\n}\n\n.ace-twilight .ace_constant.ace_language {\n \n}\n\n.ace-twilight .ace_constant.ace_library {\n \n}\n\n.ace-twilight .ace_constant.ace_numeric {\n \n}\n\n.ace-twilight .ace_invalid {\n \n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color:#F8F8F8;\nbackground-color:rgba(86, 45, 86, 0.75);\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#D2A8A1;\n}\n\n.ace-twilight .ace_support {\n color:#9B859D;\n}\n\n.ace-twilight .ace_support.ace_function {\n color:#DAD085;\n}\n\n.ace-twilight .ace_function.ace_buildin {\n \n}\n\n.ace-twilight .ace_string {\n color:#8F9D6A;\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color:#E9C062;\n}\n\n.ace-twilight .ace_comment {\n font-style:italic;\ncolor:#5F5A60;\n}\n\n.ace-twilight .ace_comment.ace_doc {\n \n}\n\n.ace-twilight .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-twilight .ace_variable {\n color:#7587A6;\n}\n\n.ace-twilight .ace_variable.ace_language {\n \n}\n\n.ace-twilight .ace_xml_pe {\n color:#494949;\n}";d.importCssString(e),b.cssClass="ace-twilight"})

File diff suppressed because one or more lines are too long

View file

@ -75,13 +75,16 @@ require(deps, function() {
var env = require("pilot/environment").create(); var env = require("pilot/environment").create();
catalog.startupPlugins({ env: env }).then(function() { catalog.startupPlugins({ env: env }).then(function() {
env.document = doc; env.document = doc;
env.editor = env; env.editor = editor;
editor.resize(); editor.resize();
Event.addListener(window, "resize", function() { Event.addListener(window, "resize", function() {
editor.resize(); editor.resize();
}); });
el.env = env; el.env = env;
}); });
// Store env on editor such that it can be accessed later on from
// the returned object.
editor.env = env;
return editor; return editor;
} }
}; };

View file

@ -130,19 +130,18 @@ function setupContainer(element, getValue) {
var parentNode = element.parentNode; var parentNode = element.parentNode;
// This will hold the Bespin editor. // This will hold the editor.
var container = document.createElement('div'); var container = document.createElement('div');
// To put Bespin in the place of the textarea, we have to copy a // To put Ace in the place of the textarea, we have to copy a few of the
// few of the textarea's style attributes to the div container. // textarea's style attributes to the div container.
// //
// The problem is, that the properties have to get computed (they // The problem is that the properties have to get computed (they might be
// might be defined by a CSS file on the page - you can't access // defined by a CSS file on the page - you can't access such rules that
// such rules that apply to an element via elm.style). Computed // apply to an element via elm.style). Computed properties are converted to
// properties are converted to pixels although the dimension might // pixels although the dimension might be given as percentage. When the
// be given as percentage. When the window resizes, the dimensions // window resizes, the dimensions defined by percentages changes, so the
// defined by percentages changes, so the properties have to get // properties have to get recomputed to get the new/true pixels.
// recomputed to get the new/true pixels.
var resizeEvent = function() { var resizeEvent = function() {
var style = 'position:relative;'; var style = 'position:relative;';
[ [
@ -152,20 +151,20 @@ function setupContainer(element, getValue) {
getCSSProperty(element, container, item) + ';'; getCSSProperty(element, container, item) + ';';
}); });
// Calculating the width/height of the textarea is somewhat // Calculating the width/height of the textarea is somewhat tricky. To
// tricky. To do it right, you have to include the paddings // do it right, you have to include the paddings to the sides as well
// to the sides as well (eg. width = width + padding-left, -right). // (eg. width = width + padding-left, -right). This works well, as
// This works well, as long as the width of the element is not // long as the width of the element is not set or given in pixels. In
// set or given in pixels. In this case and after the textarea // this case and after the textarea is hidden, getCSSProperty(element,
// is hidden, getCSSProperty(element, container, 'width') will // container, 'width') will still return pixel value. If the element
// still return pixel value. If the element has realtiv dimensions // has realtiv dimensions (e.g. width='95<percent>')
// (e.g. width='95<percent>') getCSSProperty(...) will return pixel values // getCSSProperty(...) will return pixel values only as long as the
// only as long as the textarea is visible. After it is hidden // textarea is visible. After it is hidden getCSSProperty will return
// getCSSProperty will return the relativ dimensions as they // the relative dimensions as they are set on the element (in the case
// are set on the element (in the case of width, 95<percent>). // of width, 95<percent>).
// Making the sum of pixel vaules (e.g. padding) and realtive // Making the sum of pixel vaules (e.g. padding) and realtive values
// values (e.g. <percent>) is not possible. As such the padding styles // (e.g. <percent>) is not possible. As such the padding styles are
// are ignored. // ignored.
// The complete width is the width of the textarea + the padding // The complete width is the width of the textarea + the padding
// to the left and right. // to the left and right.
@ -367,6 +366,10 @@ function setupApi(editor, editorDiv, settingDiv, ace, options) {
} }
break; break;
case "useSoftTabs":
session.setUseSoftTabs(toBool(value));
break;
case "showPrintMargin": case "showPrintMargin":
renderer.setShowPrintMargin(toBool(value)); renderer.setShowPrintMargin(toBool(value));
break break
@ -393,17 +396,18 @@ function setupApi(editor, editorDiv, settingDiv, ace, options) {
function setupSettingPanel(settingDiv, settingOpener, api, options) { function setupSettingPanel(settingDiv, settingOpener, api, options) {
var BOOL = { var BOOL = {
"true": true, "true": true,
"false": false "false": false
} }
var desc = { var desc = {
mode: "Mode:", mode: "Mode:",
gutter: "Display Gutter:", gutter: "Display Gutter:",
theme: "Theme:", theme: "Theme:",
fontSize: "Font Size:", fontSize: "Font Size:",
softWrap: "Soft Wrap:", softWrap: "Soft Wrap:",
showPrintMargin: "Show Print Margin:" showPrintMargin: "Show Print Margin:",
useSoftTabs: "Use Soft Tabs:"
} }
var optionValues = { var optionValues = {
@ -420,18 +424,18 @@ function setupSettingPanel(settingDiv, settingOpener, api, options) {
}, },
theme: { theme: {
textmate: "Textmate", textmate: "Textmate",
eclipse: "Eclipse", eclipse: "Eclipse",
clouds: "Clouds", clouds: "Clouds",
clouds_midnight: "Clouds Midnight", clouds_midnight: "Clouds Midnight",
cobalt: "Cobalt", cobalt: "Cobalt",
dawn: "Dawn", dawn: "Dawn",
idle_fingers: "Idle Fingers", idle_fingers: "Idle Fingers",
kr_theme: "Kr Theme", kr_theme: "Kr Theme",
mono_industrial: "Mono Industrial", mono_industrial: "Mono Industrial",
monokai: "Monokai", monokai: "Monokai",
pastel_on_dark: "Pastel On Dark", pastel_on_dark: "Pastel On Dark",
twilight: "Twilight" twilight: "Twilight"
}, },
gutter: BOOL, gutter: BOOL,
fontSize: { fontSize: {
@ -447,7 +451,8 @@ function setupSettingPanel(settingDiv, settingOpener, api, options) {
80: "80", 80: "80",
free: "Free" free: "Free"
}, },
showPrintMargin: BOOL showPrintMargin: BOOL,
useSoftTabs: BOOL
} }
var table = []; var table = [];
@ -511,7 +516,8 @@ window.__ace_shadowed__.options = {
gutter: "false", gutter: "false",
fontSize: "12px", fontSize: "12px",
softWrap: "off", softWrap: "off",
showPrintMargin: "false" showPrintMargin: "false",
useSoftTabs: "true"
} }
}); });

View file

@ -43,7 +43,12 @@
(function() { (function() {
var _define = function(module, payload) { if (window.require) {
require.packaged = true;
return;
}
var _define = function(module, deps, payload) {
if (typeof module !== 'string') { if (typeof module !== 'string') {
if (_define.original) if (_define.original)
_define.original.apply(window, arguments); _define.original.apply(window, arguments);
@ -54,6 +59,9 @@ var _define = function(module, payload) {
return; return;
} }
if (arguments.length == 2)
payload = deps;
if (!define.modules) if (!define.modules)
define.modules = {}; define.modules = {};
@ -76,13 +84,12 @@ var _require = function(module, callback) {
if (!dep && _require.original) if (!dep && _require.original)
return _require.original.apply(window, arguments); return _require.original.apply(window, arguments);
params.push(dep); params.push(dep);
}; }
if (callback) { if (callback) {
callback.apply(null, params); callback.apply(null, params);
} }
} }
else if (typeof module === 'string') {
if (typeof module === 'string') {
var payload = lookup(module); var payload = lookup(module);
if (!payload && _require.original) if (!payload && _require.original)
return _require.original.apply(window, arguments); return _require.original.apply(window, arguments);
@ -92,8 +99,12 @@ var _require = function(module, callback) {
} }
return payload; return payload;
}; }
} else {
if (_require.original)
return _require.original.apply(window, arguments);
}
};
if (window.require) if (window.require)
_require.original = window.require; _require.original = window.require;

View file

@ -44,7 +44,7 @@
(function() { (function() {
var _define = function(module, payload) { var _define = function(module, deps, payload) {
if (typeof module !== 'string') { if (typeof module !== 'string') {
if (_define.original) if (_define.original)
_define.original.apply(window, arguments); _define.original.apply(window, arguments);
@ -55,6 +55,9 @@ var _define = function(module, payload) {
return; return;
} }
if (arguments.length == 2)
payload = deps;
if (!_define.modules) if (!_define.modules)
_define.modules = {}; _define.modules = {};

View file

@ -40,7 +40,7 @@
define(function(require, exports, module) { define(function(require, exports, module) {
exports.launch = function(env) { exports.launch = function(env) {
var canon = require("pilot/canon");
var event = require("pilot/event"); var event = require("pilot/event");
var Editor = require("ace/editor").Editor; var Editor = require("ace/editor").Editor;
var Renderer = require("ace/virtual_renderer").VirtualRenderer; var Renderer = require("ace/virtual_renderer").VirtualRenderer;
@ -54,10 +54,13 @@ exports.launch = function(env) {
var PythonMode = require("ace/mode/python").Mode; var PythonMode = require("ace/mode/python").Mode;
var PhpMode = require("ace/mode/php").Mode; var PhpMode = require("ace/mode/php").Mode;
var JavaMode = require("ace/mode/java").Mode; var JavaMode = require("ace/mode/java").Mode;
var CSharpMode = require("ace/mode/csharp").Mode;
var RubyMode = require("ace/mode/ruby").Mode; var RubyMode = require("ace/mode/ruby").Mode;
var CCPPMode = require("ace/mode/c_cpp").Mode; var CCPPMode = require("ace/mode/c_cpp").Mode;
var CoffeeMode = require("ace/mode/coffee").Mode; var CoffeeMode = require("ace/mode/coffee").Mode;
var PerlMode = require("ace/mode/perl").Mode; var PerlMode = require("ace/mode/perl").Mode;
var SvgMode = require("ace/mode/svg").Mode;
var TextileMode = require("ace/mode/textile").Mode;
var TextMode = require("ace/mode/text").Mode; var TextMode = require("ace/mode/text").Mode;
var UndoManager = require("ace/undomanager").UndoManager; var UndoManager = require("ace/undomanager").UndoManager;
@ -117,6 +120,10 @@ exports.launch = function(env) {
docs.ruby.setMode(new RubyMode()); docs.ruby.setMode(new RubyMode());
docs.ruby.setUndoManager(new UndoManager()); docs.ruby.setUndoManager(new UndoManager());
docs.csharp = new EditSession(document.getElementById("csharptext").innerHTML);
docs.csharp.setMode(new CSharpMode());
docs.csharp.setUndoManager(new UndoManager());
docs.c_cpp = new EditSession(document.getElementById("cpptext").innerHTML); docs.c_cpp = new EditSession(document.getElementById("cpptext").innerHTML);
docs.c_cpp.setMode(new CCPPMode()); docs.c_cpp.setMode(new CCPPMode());
docs.c_cpp.setUndoManager(new UndoManager()); docs.c_cpp.setUndoManager(new UndoManager());
@ -129,11 +136,21 @@ exports.launch = function(env) {
docs.perl.setMode(new PerlMode()); docs.perl.setMode(new PerlMode());
docs.perl.setUndoManager(new UndoManager()); docs.perl.setUndoManager(new UndoManager());
docs.svg = new EditSession(document.getElementById("svgtext").innerHTML.replace("&lt;", "<"));
docs.svg.setMode(new SvgMode());
docs.svg.setUndoManager(new UndoManager());
docs.textile = new EditSession(document.getElementById("textiletext").innerHTML);
docs.textile.setMode(new TextileMode());
docs.textile.setUndoManager(new UndoManager());
var container = document.getElementById("editor"); var container = document.getElementById("editor");
env.editor = new Editor(new Renderer(container, theme)); env.editor = new Editor(new Renderer(container, theme));
var modes = { var modes = {
text: new TextMode(), text: new TextMode(),
textile: new TextileMode(),
svg: new SvgMode(),
xml: new XmlMode(), xml: new XmlMode(),
html: new HtmlMode(), html: new HtmlMode(),
css: new CssMode(), css: new CssMode(),
@ -144,7 +161,8 @@ exports.launch = function(env) {
ruby: new RubyMode(), ruby: new RubyMode(),
c_cpp: new CCPPMode(), c_cpp: new CCPPMode(),
coffee: new CoffeeMode(), coffee: new CoffeeMode(),
perl: new PerlMode() perl: new PerlMode(),
csharp: new CSharpMode()
}; };
function getMode() { function getMode() {
@ -192,6 +210,15 @@ exports.launch = function(env) {
else if (mode instanceof PerlMode) { else if (mode instanceof PerlMode) {
modeEl.value = "perl"; modeEl.value = "perl";
} }
else if (mode instanceof CSharpMode) {
modeEl.value = "csharp";
}
else if (mode instanceof SvgMode) {
modeEl.value = "svg";
}
else if (mode instanceof TextileMode) {
modeEl.value = "textile";
}
else { else {
modeEl.value = "text"; modeEl.value = "text";
} }
@ -270,6 +297,10 @@ exports.launch = function(env) {
env.editor.setHighlightSelectedWord(checked); env.editor.setHighlightSelectedWord(checked);
}); });
bindCheckbox("show_hscroll", function(checked) {
env.editor.renderer.setHScrollBarAlwaysVisible(checked);
});
function bindCheckbox(id, callback) { function bindCheckbox(id, callback) {
var el = document.getElementById(id); var el = document.getElementById(id);
var onCheck = function() { var onCheck = function() {
@ -326,6 +357,8 @@ exports.launch = function(env) {
mode = "python"; mode = "python";
} else if (/^.*\.php$/i.test(file.name)) { } else if (/^.*\.php$/i.test(file.name)) {
mode = "php"; mode = "php";
} else if (/^.*\.cs$/i.test(file.name)) {
mode = "csharp";
} else if (/^.*\.java$/i.test(file.name)) { } else if (/^.*\.java$/i.test(file.name)) {
mode = "java"; mode = "java";
} else if (/^.*\.rb$/i.test(file.name)) { } else if (/^.*\.rb$/i.test(file.name)) {
@ -350,6 +383,68 @@ exports.launch = function(env) {
}); });
window.env = env; window.env = env;
/**
* This demonstrates how you can define commands and bind shortcuts to them.
*/
// Command to focus the command line from the editor.
canon.addCommand({
name: "focuscli",
bindKey: {
win: "Ctrl-J",
mac: "Command-J",
sender: "editor"
},
exec: function() {
env.cli.cliView.element.focus();
}
});
// Command to focus the editor line from the command line.
canon.addCommand({
name: "focuseditor",
bindKey: {
win: "Ctrl-J",
mac: "Command-J",
sender: "cli"
},
exec: function() {
env.editor.focus();
}
});
// Fake-Save, works from the editor and the command line.
canon.addCommand({
name: "save",
bindKey: {
win: "Ctrl-S",
mac: "Command-S",
sender: "editor|cli"
},
exec: function() {
alert("Fake Save File");
}
});
// Fake-Print with custom lookup-sender-match function.
canon.addCommand({
name: "save",
bindKey: {
win: "Ctrl-P",
mac: "Command-P",
sender: function(env, sender, hashId, keyString) {
if (sender == "editor") {
return true;
} else {
alert("Sorry, can only print from the editor");
}
}
},
exec: function() {
alert("Fake Print File");
}
});
}; };
}); });

View file

@ -14,16 +14,19 @@
<td align="right"> <td align="right">
<label for="doc">Document:</label> <label for="doc">Document:</label>
<select id="doc" size="1"> <select id="doc" size="1">
<option value="js">JS Document</option> <option value="js">JavaScript Document</option>
<option value="html">HTML Document</option> <option value="html">HTML Document</option>
<option value="css">CSS Document</option> <option value="css">CSS Document</option>
<option value="coffee">CoffeeScript Document</option>
<option value="python">Python Document</option> <option value="python">Python Document</option>
<option value="ruby">Ruby Document</option>
<option value="perl">Perl Document</option>
<option value="php">PHP Document</option> <option value="php">PHP Document</option>
<option value="java">Java Document</option> <option value="java">Java Document</option>
<option value="ruby">Ruby Document</option> <option value="csharp">C# Document</option>
<option value="c_cpp">C++ Document</option> <option value="c_cpp">C++ Document</option>
<option value="coffee">CoffeeScript Document</option> <option value="svg">SVG Document</option>
<option value="perl">Perl Document</option> <option value="textile">Textile Document</option>
<option value="plain">Text Document</option> <option value="plain">Text Document</option>
</select> </select>
</td> </td>
@ -36,6 +39,14 @@
<option value="ace/theme/idle_fingers">idleFingers</option> <option value="ace/theme/idle_fingers">idleFingers</option>
<option value="ace/theme/pastel_on_dark">Pastel on dark</option> <option value="ace/theme/pastel_on_dark">Pastel on dark</option>
<option value="ace/theme/twilight">Twilight</option> <option value="ace/theme/twilight">Twilight</option>
<option value="ace/theme/clouds">Clouds</option>
<option value="ace/theme/clouds_midnight">Clouds Midnight</option>
<option value="ace/theme/kr_theme">krTheme</option>
<option value="ace/theme/mono_industrial">Mono Industrial</option>
<option value="ace/theme/monokai">Monokai</option>
<option value="ace/theme/merbivore">Merbivore</option>
<option value="ace/theme/merbivore_soft">Merbivore Soft</option>
<option value="ace/theme/vibrant_ink">Vibrant Ink</option>
</select> </select>
</td> </td>
<td align="right"> <td align="right">
@ -62,6 +73,10 @@
<label for="show_hidden">Show Invisibles</label> <label for="show_hidden">Show Invisibles</label>
<input type="checkbox" name="show_hidden" id="show_hidden"> <input type="checkbox" name="show_hidden" id="show_hidden">
</td> </td>
<td align="right">
<label for="show_hscroll">Persistent HScroll</label>
<input type="checkbox" name="show_hscroll" id="show_hscroll">
</td>
<td align="right" rowspan="2"> <td align="right" rowspan="2">
<img src="demo/logo.png"> <img src="demo/logo.png">
</td> </td>
@ -82,6 +97,9 @@
<option value="c_cpp">C/C++</option> <option value="c_cpp">C/C++</option>
<option value="coffee">CoffeeScript</option> <option value="coffee">CoffeeScript</option>
<option value="perl">Perl</option> <option value="perl">Perl</option>
<option value="csharp">C-Sharp</option>
<option value="svg">SVG</option>
<option value="textile">Textile</option>
</select> </select>
</td> </td>
<td align="right"> <td align="right">
@ -119,7 +137,10 @@
<div id="editor"> <div id="editor">
</div> </div>
<script type="text/editor" id="csharptext">public void HelloWorld() {
//Say Hello!
Console.WriteLine("Hello World");
}</script>
<script type="text/editor" id="jstext">function foo(items) { <script type="text/editor" id="jstext">function foo(items) {
for (var i=0; i<items.length; i++) { for (var i=0; i<items.length; i++) {
alert(items[i] + "juhu"); alert(items[i] + "juhu");
@ -306,6 +327,121 @@ for my $p (0 .. ($num_primes-1))
} }
print "\n"; print "\n";
</script>
<script type="text/editor" id="svgtext"><svg
width="800" height="600"
xmlns="http://www.w3.org/2000/svg"
onload="StartAnimation(evt)">
<title>Test Tube Progress Bar</title>
<desc>Created for the Web Directions SVG competition</desc>
<script type="text/ecmascript"><![CDATA[
var timevalue = 0;
var timer_increment = 1;
var max_time = 100;
var hickory;
var dickory;
var dock;
var i;
function StartAnimation(evt) {
hickory = evt.target.ownerDocument.getElementById("hickory");
dickory = evt.target.ownerDocument.getElementById("dickory");
dock = evt.target.ownerDocument.getElementById("dock");
ShowAndGrowElement();
}
function ShowAndGrowElement() {
timevalue = timevalue + timer_increment;
if (timevalue > max_time)
return;
// Scale the text string gradually until it is 20 times larger
scalefactor = (timevalue * 650) / max_time;
if (timevalue < 30) {
hickory.setAttribute("display", "");
hickory.setAttribute("transform", "translate(" + (600+scalefactor*3*-1 ) + ", -144 )");
}
if (timevalue > 30 && timevalue < 66) {
dickory.setAttribute("display", "");
dickory.setAttribute("transform", "translate(" + (-795+scalefactor*2) + ", 0 )");
}
if (timevalue > 66) {
dock.setAttribute("display", "");
dock.setAttribute("transform", "translate(" + (1450+scalefactor*2*-1) + ", 144 )");
}
// Call ShowAndGrowElement again <timer_increment> milliseconds later.
setTimeout("ShowAndGrowElement()", timer_increment)
}
window.ShowAndGrowElement = ShowAndGrowElement
]]>&lt;/script>
<rect
fill="#2e3436"
fill-rule="nonzero"
stroke-width="3"
y="0"
x="0"
height="600"
width="800"
id="rect3590"/>
<text
style="font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
x="50"
y="350"
id="hickory"
display="none">
Hickory,</text>
<text
style="font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
x="50"
y="350"
id="dickory"
display="none">
dickory,</text>
<text
style="font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
x="50"
y="350"
id="dock"
display="none">
dock!</text>
</svg></script>
<script type="text/editor" id="textiletext">h1. Textile document
h2. Heading Two
h3. A two-line
header
h2. Another two-line
header
Paragraph:
one, two,
thee lines!
p(classone two three). This is a paragraph with classes
p(#id). (one with an id)
p(one two three#my_id). ..classes + id
* Unordered list
** sublist
* back again!
** sublist again..
# ordered
bg. Blockquote!
This is a two-list blockquote..!
</script> </script>
<input id="cockpitInput" type="text"/> <input id="cockpitInput" type="text"/>

View file

@ -48,7 +48,7 @@ var Anchor = exports.Anchor = function(doc, row, column) {
this.document = doc; this.document = doc;
if (typeof column == "undefined") if (typeof column == "undefined")
this.setPosition(row.row, row.column) this.setPosition(row.row, row.column);
else else
this.setPosition(row, column); this.setPosition(row, column);
@ -130,11 +130,20 @@ var Anchor = exports.Anchor = function(doc, row, column) {
} }
} }
this.setPosition(row, column); this.setPosition(row, column, true);
}; };
this.setPosition = function(row, column) { this.setPosition = function(row, column, noClip) {
pos = this.$clipPositionToDocument(row, column); if (noClip) {
pos = {
row: row,
column: column
};
}
else {
pos = this.$clipPositionToDocument(row, column);
}
if (this.row == pos.row && this.column == pos.column) if (this.row == pos.row && this.column == pos.column)
return; return;

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -21,6 +22,7 @@
* Contributor(s): * Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> * Fabian Jakobs <fabian AT ajax DOT org>
* Julian Viereck <julian.viereck@gmail.com> * Julian Viereck <julian.viereck@gmail.com>
* Mihai Sucan <mihai.sucan@gmail.com>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -41,6 +43,14 @@ define(function(require, exports, module) {
var lang = require("pilot/lang"); var lang = require("pilot/lang");
var canon = require("pilot/canon"); var canon = require("pilot/canon");
function bindKey(win, mac) {
return {
win: win,
mac: mac,
sender: "editor"
};
}
canon.addCommand({ canon.addCommand({
name: "null", name: "null",
exec: function(env, args, request) { } exec: function(env, args, request) { }
@ -48,14 +58,17 @@ canon.addCommand({
canon.addCommand({ canon.addCommand({
name: "selectall", name: "selectall",
bindKey: bindKey("Ctrl-A", "Command-A"),
exec: function(env, args, request) { env.editor.selectAll(); } exec: function(env, args, request) { env.editor.selectAll(); }
}); });
canon.addCommand({ canon.addCommand({
name: "removeline", name: "removeline",
bindKey: bindKey("Ctrl-D", "Command-D"),
exec: function(env, args, request) { env.editor.removeLines(); } exec: function(env, args, request) { env.editor.removeLines(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotoline", name: "gotoline",
bindKey: bindKey("Ctrl-L", "Command-L"),
exec: function(env, args, request) { exec: function(env, args, request) {
var line = parseInt(prompt("Enter line number:")); var line = parseInt(prompt("Enter line number:"));
if (!isNaN(line)) { if (!isNaN(line)) {
@ -65,205 +78,269 @@ canon.addCommand({
}); });
canon.addCommand({ canon.addCommand({
name: "togglecomment", name: "togglecomment",
bindKey: bindKey("Ctrl-7", "Command-7"),
exec: function(env, args, request) { env.editor.toggleCommentLines(); } exec: function(env, args, request) { env.editor.toggleCommentLines(); }
}); });
canon.addCommand({ canon.addCommand({
name: "findnext", name: "findnext",
bindKey: bindKey("Ctrl-K", "Command-G"),
exec: function(env, args, request) { env.editor.findNext(); } exec: function(env, args, request) { env.editor.findNext(); }
}); });
canon.addCommand({ canon.addCommand({
name: "findprevious", name: "findprevious",
bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
exec: function(env, args, request) { env.editor.findPrevious(); } exec: function(env, args, request) { env.editor.findPrevious(); }
}); });
canon.addCommand({ canon.addCommand({
name: "find", name: "find",
bindKey: bindKey("Ctrl-F", "Command-F"),
exec: function(env, args, request) { exec: function(env, args, request) {
var needle = prompt("Find:"); var needle = prompt("Find:");
env.editor.find(needle); env.editor.find(needle);
} }
}); });
canon.addCommand({
name: "replace",
bindKey: bindKey("Ctrl-R", "Command-Option-F"),
exec: function(env, args, request) {
var needle = prompt("Find:");
if (!needle)
return;
var replacement = prompt("Replacement:");
if (!replacement)
return;
env.editor.replace(replacement, {needle: needle});
}
});
canon.addCommand({
name: "replaceall",
bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
exec: function(env, args, request) {
var needle = prompt("Find:");
if (!needle)
return;
var replacement = prompt("Replacement:");
if (!replacement)
return;
env.editor.replaceAll(replacement, {needle: needle});
}
});
canon.addCommand({ canon.addCommand({
name: "undo", name: "undo",
bindKey: bindKey("Ctrl-Z", "Command-Z"),
exec: function(env, args, request) { env.editor.undo(); } exec: function(env, args, request) { env.editor.undo(); }
}); });
canon.addCommand({ canon.addCommand({
name: "redo", name: "redo",
exec: function(env, args, request) { env.editor.redo(); } bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
});
canon.addCommand({
name: "redo",
exec: function(env, args, request) { env.editor.redo(); } exec: function(env, args, request) { env.editor.redo(); }
}); });
canon.addCommand({ canon.addCommand({
name: "overwrite", name: "overwrite",
bindKey: bindKey("Insert", "Insert"),
exec: function(env, args, request) { env.editor.toggleOverwrite(); } exec: function(env, args, request) { env.editor.toggleOverwrite(); }
}); });
canon.addCommand({ canon.addCommand({
name: "copylinesup", name: "copylinesup",
bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"),
exec: function(env, args, request) { env.editor.copyLinesUp(); } exec: function(env, args, request) { env.editor.copyLinesUp(); }
}); });
canon.addCommand({ canon.addCommand({
name: "movelinesup", name: "movelinesup",
bindKey: bindKey("Alt-Up", "Option-Up"),
exec: function(env, args, request) { env.editor.moveLinesUp(); } exec: function(env, args, request) { env.editor.moveLinesUp(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selecttostart", name: "selecttostart",
bindKey: bindKey("Alt-Shift-Up", "Command-Shift-Up"),
exec: function(env, args, request) { env.editor.getSelection().selectFileStart(); } exec: function(env, args, request) { env.editor.getSelection().selectFileStart(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotostart", name: "gotostart",
bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"),
exec: function(env, args, request) { env.editor.navigateFileStart(); } exec: function(env, args, request) { env.editor.navigateFileStart(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectup", name: "selectup",
bindKey: bindKey("Shift-Up", "Shift-Up"),
exec: function(env, args, request) { env.editor.getSelection().selectUp(); } exec: function(env, args, request) { env.editor.getSelection().selectUp(); }
}); });
canon.addCommand({ canon.addCommand({
name: "golineup", name: "golineup",
bindKey: bindKey("Up", "Up|Ctrl-P"),
exec: function(env, args, request) { env.editor.navigateUp(args.times); } exec: function(env, args, request) { env.editor.navigateUp(args.times); }
}); });
canon.addCommand({ canon.addCommand({
name: "copylinesdown", name: "copylinesdown",
bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"),
exec: function(env, args, request) { env.editor.copyLinesDown(); } exec: function(env, args, request) { env.editor.copyLinesDown(); }
}); });
canon.addCommand({ canon.addCommand({
name: "movelinesdown", name: "movelinesdown",
bindKey: bindKey("Alt-Down", "Option-Down"),
exec: function(env, args, request) { env.editor.moveLinesDown(); } exec: function(env, args, request) { env.editor.moveLinesDown(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selecttoend", name: "selecttoend",
bindKey: bindKey("Alt-Shift-Down", "Command-Shift-Down"),
exec: function(env, args, request) { env.editor.getSelection().selectFileEnd(); } exec: function(env, args, request) { env.editor.getSelection().selectFileEnd(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotoend", name: "gotoend",
bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"),
exec: function(env, args, request) { env.editor.navigateFileEnd(); } exec: function(env, args, request) { env.editor.navigateFileEnd(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectdown", name: "selectdown",
bindKey: bindKey("Shift-Down", "Shift-Down"),
exec: function(env, args, request) { env.editor.getSelection().selectDown(); } exec: function(env, args, request) { env.editor.getSelection().selectDown(); }
}); });
canon.addCommand({ canon.addCommand({
name: "golinedown", name: "golinedown",
bindKey: bindKey("Down", "Down|Ctrl-N"),
exec: function(env, args, request) { env.editor.navigateDown(args.times); } exec: function(env, args, request) { env.editor.navigateDown(args.times); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectwordleft", name: "selectwordleft",
bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
exec: function(env, args, request) { env.editor.getSelection().selectWordLeft(); } exec: function(env, args, request) { env.editor.getSelection().selectWordLeft(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotowordleft", name: "gotowordleft",
bindKey: bindKey("Ctrl-Left", "Option-Left"),
exec: function(env, args, request) { env.editor.navigateWordLeft(); } exec: function(env, args, request) { env.editor.navigateWordLeft(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selecttolinestart", name: "selecttolinestart",
bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); } exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotolinestart", name: "gotolinestart",
bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
exec: function(env, args, request) { env.editor.navigateLineStart(); } exec: function(env, args, request) { env.editor.navigateLineStart(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectleft", name: "selectleft",
bindKey: bindKey("Shift-Left", "Shift-Left"),
exec: function(env, args, request) { env.editor.getSelection().selectLeft(); } exec: function(env, args, request) { env.editor.getSelection().selectLeft(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotoleft", name: "gotoleft",
bindKey: bindKey("Left", "Left|Ctrl-B"),
exec: function(env, args, request) { env.editor.navigateLeft(args.times); } exec: function(env, args, request) { env.editor.navigateLeft(args.times); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectwordright", name: "selectwordright",
bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
exec: function(env, args, request) { env.editor.getSelection().selectWordRight(); } exec: function(env, args, request) { env.editor.getSelection().selectWordRight(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotowordright", name: "gotowordright",
bindKey: bindKey("Ctrl-Right", "Option-Right"),
exec: function(env, args, request) { env.editor.navigateWordRight(); } exec: function(env, args, request) { env.editor.navigateWordRight(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selecttolineend", name: "selecttolineend",
bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); } exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotolineend", name: "gotolineend",
bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
exec: function(env, args, request) { env.editor.navigateLineEnd(); } exec: function(env, args, request) { env.editor.navigateLineEnd(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectright", name: "selectright",
bindKey: bindKey("Shift-Right", "Shift-Right"),
exec: function(env, args, request) { env.editor.getSelection().selectRight(); } exec: function(env, args, request) { env.editor.getSelection().selectRight(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotoright", name: "gotoright",
bindKey: bindKey("Right", "Right|Ctrl-F"),
exec: function(env, args, request) { env.editor.navigateRight(args.times); } exec: function(env, args, request) { env.editor.navigateRight(args.times); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectpagedown", name: "selectpagedown",
bindKey: bindKey("Shift-PageDown", "Shift-PageDown"),
exec: function(env, args, request) { env.editor.selectPageDown(); } exec: function(env, args, request) { env.editor.selectPageDown(); }
}); });
canon.addCommand({ canon.addCommand({
name: "pagedown", name: "pagedown",
bindKey: bindKey(null, "PageDown"),
exec: function(env, args, request) { env.editor.scrollPageDown(); } exec: function(env, args, request) { env.editor.scrollPageDown(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotopagedown", name: "gotopagedown",
bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"),
exec: function(env, args, request) { env.editor.gotoPageDown(); } exec: function(env, args, request) { env.editor.gotoPageDown(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectpageup", name: "selectpageup",
bindKey: bindKey("Shift-PageUp", "Shift-PageUp"),
exec: function(env, args, request) { env.editor.selectPageUp(); } exec: function(env, args, request) { env.editor.selectPageUp(); }
}); });
canon.addCommand({ canon.addCommand({
name: "pageup", name: "pageup",
bindKey: bindKey(null, "PageUp"),
exec: function(env, args, request) { env.editor.scrollPageUp(); } exec: function(env, args, request) { env.editor.scrollPageUp(); }
}); });
canon.addCommand({ canon.addCommand({
name: "gotopageup", name: "gotopageup",
bindKey: bindKey("PageUp", "Option-PageUp"),
exec: function(env, args, request) { env.editor.gotoPageUp(); } exec: function(env, args, request) { env.editor.gotoPageUp(); }
}); });
canon.addCommand({ canon.addCommand({
name: "selectlinestart", name: "selectlinestart",
bindKey: bindKey("Shift-Home", "Shift-Home"),
exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); } exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); }
}); });
canon.addCommand({
name: "gotolinestart",
exec: function(env, args, request) { env.editor.navigateLineStart(); }
});
canon.addCommand({ canon.addCommand({
name: "selectlineend", name: "selectlineend",
bindKey: bindKey("Shift-End", "Shift-End"),
exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); } exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); }
}); });
canon.addCommand({
name: "gotolineend",
exec: function(env, args, request) { env.editor.navigateLineEnd(); }
});
canon.addCommand({ canon.addCommand({
name: "del", name: "del",
bindKey: bindKey("Delete", "Delete|Ctrl-D"),
exec: function(env, args, request) { env.editor.removeRight(); } exec: function(env, args, request) { env.editor.removeRight(); }
}); });
canon.addCommand({ canon.addCommand({
name: "backspace", name: "backspace",
bindKey: bindKey(
"Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace",
"Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"
),
exec: function(env, args, request) { env.editor.removeLeft(); } exec: function(env, args, request) { env.editor.removeLeft(); }
}); });
canon.addCommand({ canon.addCommand({
name: "removetolinestart", name: "removetolinestart",
bindKey: bindKey(null, "Option-Backspace"),
exec: function(env, args, request) { env.editor.removeToLineStart(); } exec: function(env, args, request) { env.editor.removeToLineStart(); }
}); });
canon.addCommand({ canon.addCommand({
name: "removetolineend", name: "removetolineend",
bindKey: bindKey(null, "Ctrl-K"),
exec: function(env, args, request) { env.editor.removeToLineEnd(); } exec: function(env, args, request) { env.editor.removeToLineEnd(); }
}); });
canon.addCommand({ canon.addCommand({
name: "removewordleft", name: "removewordleft",
bindKey: bindKey(null, "Alt-Backspace|Ctrl-Alt-Backspace"),
exec: function(env, args, request) { env.editor.removeWordLeft(); } exec: function(env, args, request) { env.editor.removeWordLeft(); }
}); });
canon.addCommand({ canon.addCommand({
name: "removewordright", name: "removewordright",
bindKey: bindKey(null, "Alt-Delete"),
exec: function(env, args, request) { env.editor.removeWordRight(); } exec: function(env, args, request) { env.editor.removeWordRight(); }
}); });
canon.addCommand({ canon.addCommand({
name: "outdent", name: "outdent",
bindKey: bindKey("Shift-Tab", "Shift-Tab"),
exec: function(env, args, request) { env.editor.blockOutdent(); } exec: function(env, args, request) { env.editor.blockOutdent(); }
}); });
canon.addCommand({ canon.addCommand({
name: "indent", name: "indent",
bindKey: bindKey("Tab", "Tab"),
exec: function(env, args, request) { env.editor.indent(); } exec: function(env, args, request) { env.editor.indent(); }
}); });
canon.addCommand({ canon.addCommand({
@ -274,16 +351,18 @@ canon.addCommand({
}); });
canon.addCommand({ canon.addCommand({
name: "centerselection", name: "centerselection",
bindKey: bindKey("Ctrl-L", "Ctrl-L"),
exec: function(env, args, request) { env.editor.centerSelection(); } exec: function(env, args, request) { env.editor.centerSelection(); }
}); });
canon.addCommand({ canon.addCommand({
name: "splitline", name: "splitline",
bindKey: bindKey(null, "Ctrl-O"),
exec: function(env, args, request) { env.editor.splitLine(); } exec: function(env, args, request) { env.editor.splitLine(); }
}); });
canon.addCommand({ canon.addCommand({
name: "transposeletters", name: "transposeletters",
bindKey: bindKey("Ctrl-T", "Ctrl-T"),
exec: function(env, args, request) { env.editor.transposeLetters(); } exec: function(env, args, request) { env.editor.transposeLetters(); }
}); });
}); });

View file

@ -152,3 +152,7 @@
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
.ace_dragging .ace_marker-layer, .ace_dragging .ace_text-layer {
cursor: move;
}

View file

@ -40,6 +40,7 @@ define(function(require, exports, module) {
var oop = require("pilot/oop"); var oop = require("pilot/oop");
var EventEmitter = require("pilot/event_emitter").EventEmitter; var EventEmitter = require("pilot/event_emitter").EventEmitter;
var Range = require("ace/range").Range; var Range = require("ace/range").Range;
var Anchor = require("ace/anchor").Anchor;
var Document = function(text) { var Document = function(text) {
this.$lines = []; this.$lines = [];
@ -70,6 +71,10 @@ var Document = function(text) {
return this.getAllLines().join(this.getNewLineCharacter()); return this.getAllLines().join(this.getNewLineCharacter());
}; };
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
// check for IE split bug // check for IE split bug
if ("aaa".split(/a/).length == 0) if ("aaa".split(/a/).length == 0)
this.$split = function(text) { this.$split = function(text) {
@ -174,39 +179,17 @@ var Document = function(text) {
if (this.getLength() <= 1) if (this.getLength() <= 1)
this.$detectNewLine(text); this.$detectNewLine(text);
var newLines = this.$split(text); var lines = this.$split(text);
var firstLine = lines.splice(0, 1)[0];
var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
if (this.isNewLine(text)) { position = this.insertInLine(position, firstLine);
var end = this.insertNewLine(position); if (lastLine !== null) {
position = this.insertNewLine(position); // terminate first line
position = this.insertLines(position.row, lines);
position = this.insertInLine(position, lastLine || "");
} }
else if (newLines.length == 1) { return position;
var end = this.insertInLine(position, text);
}
else {
if (newLines[0].length > 0) {
var end = this.insertInLine(position, newLines[0]);
this.insertNewLine(end);
}
// If we are inserting at the end of the document, we don't need to
// use insertInLine (concorde depends on this optimization!)
if (position.row + 1 == this.getLength()) {
this.insertLines(position.row + 1,
newLines.slice(1, newLines.length));
var end = {
row: position.row + newLines.length - 1,
column: position.column + newLines[newLines.length - 1].length
};
} else {
if (newLines.length > 2)
this.insertLines(position.row + 1,
newLines.slice(1, newLines.length - 1));
var end = this.insertInLine({
row: position.row + newLines.length - 1,
column: 0
}, newLines[newLines.length - 1]);
}
}
return end;
}; };
this.insertLines = function(row, lines) { this.insertLines = function(row, lines) {

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -20,6 +21,7 @@
* *
* Contributor(s): * Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> * Fabian Jakobs <fabian AT ajax DOT org>
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -45,8 +47,6 @@ var TextMode = require("ace/mode/text").Mode;
var Range = require("ace/range").Range; var Range = require("ace/range").Range;
var Document = require("ace/document").Document; var Document = require("ace/document").Document;
var NO_CHANGE_DELTAS = {};
var EditSession = function(text, mode) { var EditSession = function(text, mode) {
this.$modified = true; this.$modified = true;
this.$breakpoints = []; this.$breakpoints = [];
@ -54,7 +54,6 @@ var EditSession = function(text, mode) {
this.$backMarkers = {}; this.$backMarkers = {};
this.$markerId = 1; this.$markerId = 1;
this.$wrapData = []; this.$wrapData = [];
this.listeners = [];
if (text instanceof Document) { if (text instanceof Document) {
this.setDocument(text); this.setDocument(text);
@ -87,7 +86,7 @@ var EditSession = function(text, mode) {
this.onChange = function(e) { this.onChange = function(e) {
var delta = e.data; var delta = e.data;
this.$modified = true; this.$modified = true;
if (!this.$fromUndo && this.$undoManager) { if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
this.$deltas.push(delta); this.$deltas.push(delta);
this.$informUndoManager.schedule(); this.$informUndoManager.schedule();
} }
@ -97,8 +96,9 @@ var EditSession = function(text, mode) {
}; };
this.setValue = function(text) { this.setValue = function(text) {
this.doc.setValue(text); this.doc.setValue(text);
this.$deltas = []; this.$deltas = [];
this.getUndoManager().reset();
}; };
this.getValue = this.getValue =
@ -133,7 +133,8 @@ var EditSession = function(text, mode) {
this.$defaultUndoManager = { this.$defaultUndoManager = {
undo: function() {}, undo: function() {},
redo: function() {} redo: function() {},
reset: function() {}
}; };
this.getUndoManager = function() { this.getUndoManager = function() {
@ -176,6 +177,22 @@ var EditSession = function(text, mode) {
return this.$useSoftTabs && (position.column % this.$tabSize == 0); return this.$useSoftTabs && (position.column % this.$tabSize == 0);
}; };
this.$overwrite = false;
this.setOverwrite = function(overwrite) {
if (this.$overwrite == overwrite) return;
this.$overwrite = overwrite;
this._dispatchEvent("changeOverwrite");
};
this.getOverwrite = function() {
return this.$overwrite;
};
this.toggleOverwrite = function() {
this.setOverwrite(!this.$overwrite);
};
this.getBreakpoints = function() { this.getBreakpoints = function() {
return this.$breakpoints; return this.$breakpoints;
}; };
@ -286,7 +303,7 @@ var EditSession = function(text, mode) {
}; };
this.tokenRe = /^[\w\d]+/g; this.tokenRe = /^[\w\d]+/g;
this.nonTokenRe = /^(?:[^\w\d|[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF])+/g; this.nonTokenRe = /^(?:[^\w\d]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF])+/g;
this.getWordRange = function(row, column) { this.getWordRange = function(row, column) {
var line = this.getLine(row); var line = this.getLine(row);
@ -327,6 +344,24 @@ var EditSession = function(text, mode) {
return this.doc.getNewLineMode(); return this.doc.getNewLineMode();
}; };
this.$useWorker = true;
this.setUseWorker = function(useWorker) {
if (this.$useWorker == useWorker)
return;
if (useWorker && !this.$worker && window.Worker)
this.$worker = mode.createWorker(this);
if (!useWorker && this.$worker) {
this.$worker.terminate();
this.$worker = null;
}
};
this.getUseWorker = function() {
return this.$useWorker;
};
this.$mode = null; this.$mode = null;
this.setMode = function(mode) { this.setMode = function(mode) {
if (this.$mode === mode) return; if (this.$mode === mode) return;
@ -334,7 +369,7 @@ var EditSession = function(text, mode) {
if (this.$worker) if (this.$worker)
this.$worker.terminate(); this.$worker.terminate();
if (window.Worker && !require.noWorker) if (this.$useWorker && window.Worker && !require.noWorker)
this.$worker = mode.createWorker(this); this.$worker = mode.createWorker(this);
else else
this.$worker = null; this.$worker = null;
@ -536,15 +571,7 @@ var EditSession = function(text, mode) {
this.doc.revertDeltas(deltas); this.doc.revertDeltas(deltas);
this.$fromUndo = false; this.$fromUndo = false;
// update the selection this.$setUndoSelection(deltas, true);
var firstDelta = deltas[0];
var lastDelta = deltas[deltas.length-1];
this.selection.clearSelection();
if (firstDelta.action == "insertText" || firstDelta.action == "insertLines")
this.selection.moveCursorToPosition(firstDelta.range.start);
if (firstDelta.action == "removeText" || firstDelta.action == "removeLines")
this.selection.setSelectionRange(Range.fromPoints(lastDelta.range.start, firstDelta.range.end));
}, },
this.redoChanges = function(deltas) { this.redoChanges = function(deltas) {
@ -555,21 +582,98 @@ var EditSession = function(text, mode) {
this.doc.applyDeltas(deltas); this.doc.applyDeltas(deltas);
this.$fromUndo = false; this.$fromUndo = false;
// update the selection this.$setUndoSelection(deltas, false);
var firstDelta = deltas[0]; },
var lastDelta = deltas[deltas.length-1];
this.$setUndoSelection = function(deltas, isUndo) {
// invert deltas is they are an undo
if (isUndo)
deltas = deltas.map(function(delta) {
var d = {
range: delta.range
}
if (delta.action == "insertText" || delta.action == "insertLines")
d.action = "removeText"
else
d.action = "insertText"
return d;
}).reverse();
var actions = [{}];
// collapse insert and remove operations
for (var i=0; i<deltas.length; i++) {
var delta = deltas[i];
var isInsert = delta.action == "insertText" || delta.action == "insertLines";
var action = actions[actions.length-1];
if (action.isInsert !== isInsert) {
actions.push({
isInsert: isInsert,
start: isInsert ? delta.range.start : delta.range.end,
end: isInsert ? delta.range.end : delta.range.start
})
}
else {
if (isInsert)
action.end = delta.range.end;
else
action.start = delta.range.start;
}
}
// update selection based on last operation
this.selection.clearSelection(); this.selection.clearSelection();
if (firstDelta.action == "insertText" || firstDelta.action == "insertLines") var action = actions[actions.length-1];
this.selection.setSelectionRange(Range.fromPoints(firstDelta.range.start, lastDelta.range.end)); if (action.isInsert)
if (firstDelta.action == "removeText" || firstDelta.action == "removeLines") this.selection.setSelectionRange(Range.fromPoints(action.start, action.end));
this.selection.moveCursorToPosition(lastDelta.range.start); else
this.selection.moveCursorToPosition(action.end);
}, },
this.replace = function(range, text) { this.replace = function(range, text) {
return this.doc.replace(range, text); return this.doc.replace(range, text);
}; };
/**
* Move a range of text from the given range to the given position.
*
* @param fromRange {Range} The range of text you want moved within the
* document.
* @param toPosition {Object} The location (row and column) where you want
* to move the text to.
* @return {Range} The new range where the text was moved to.
*/
this.moveText = function(fromRange, toPosition) {
var text = this.getTextRange(fromRange);
this.remove(fromRange);
var toRow = toPosition.row;
var toColumn = toPosition.column;
// Make sure to update the insert location, when text is removed in
// front of the chosen point of insertion.
if (!fromRange.isMultiLine() && fromRange.start.row == toRow &&
fromRange.end.column < toColumn)
toColumn -= text.length;
if (fromRange.isMultiLine() && fromRange.end.row < toRow) {
var lines = this.doc.$split(text);
toRow -= lines.length - 1;
}
var endRow = toRow + fromRange.end.row - fromRange.start.row;
var endColumn = fromRange.isMultiLine() ?
fromRange.end.column :
toColumn + fromRange.end.column - fromRange.start.column;
var toRange = new Range(toRow, toColumn, endRow, endColumn);
this.insert(toRange.start, text);
return toRange;
};
this.indentRows = function(startRow, endRow, indentString) { this.indentRows = function(startRow, endRow, indentString) {
indentString = indentString.replace(/\t/g, this.getTabString()); indentString = indentString.replace(/\t/g, this.getTabString());
for (var row=startRow; row<=endRow; row++) { for (var row=startRow; row<=endRow; row++) {

View file

@ -121,14 +121,15 @@ var Editor =function(renderer, session) {
if (this.session) { if (this.session) {
var oldSession = this.session; var oldSession = this.session;
this.session.removeEventListener("change", this.$onDocumentChange); this.session.removeEventListener("change", this.$onDocumentChange);
this.session.removeEventListener("changeMode", this.$onDocumentModeChange); this.session.removeEventListener("changeMode", this.$onChangeMode);
this.session.removeEventListener("changeTabSize", this.$onDocumentChangeTabSize); this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
this.session.removeEventListener("changeWrapLimit", this.$onDocumentChangeWrapLimit); this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
this.session.removeEventListener("changeWrapMode", this.$onDocumentChangeWrapMode); this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker); this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
this.session.removeEventListener("changeBreakpoint", this.$onDocumentChangeBreakpoint); this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
this.session.removeEventListener("changeAnnotation", this.$onDocumentChangeAnnotation); this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
var selection = this.session.getSelection(); var selection = this.session.getSelection();
selection.removeEventListener("changeCursor", this.$onCursorChange); selection.removeEventListener("changeCursor", this.$onCursorChange);
@ -143,17 +144,17 @@ var Editor =function(renderer, session) {
session.addEventListener("change", this.$onDocumentChange); session.addEventListener("change", this.$onDocumentChange);
this.renderer.setSession(session); this.renderer.setSession(session);
this.$onDocumentModeChange = this.onDocumentModeChange.bind(this); this.$onChangeMode = this.onChangeMode.bind(this);
session.addEventListener("changeMode", this.$onDocumentModeChange); session.addEventListener("changeMode", this.$onChangeMode);
this.$onDocumentChangeTabSize = this.renderer.updateText.bind(this.renderer); this.$onChangeTabSize = this.renderer.updateText.bind(this.renderer);
session.addEventListener("changeTabSize", this.$onDocumentChangeTabSize); session.addEventListener("changeTabSize", this.$onChangeTabSize);
this.$onDocumentChangeWrapLimit = this.onDocumentChangeWrapLimit.bind(this); this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
session.addEventListener("changeWrapLimit", this.$onDocumentChangeWrapLimit); session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
this.$onDocumentChangeWrapMode = this.onDocumentChangeWrapMode.bind(this); this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
session.addEventListener("changeWrapMode", this.$onDocumentChangeWrapMode); session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
@ -161,21 +162,22 @@ var Editor =function(renderer, session) {
this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker); this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
this.$onDocumentChangeBreakpoint = this.onDocumentChangeBreakpoint.bind(this); this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
this.session.addEventListener("changeBreakpoint", this.$onDocumentChangeBreakpoint); this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
this.$onDocumentChangeAnnotation = this.onDocumentChangeAnnotation.bind(this); this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
this.session.addEventListener("changeAnnotation", this.$onDocumentChangeAnnotation); this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
this.selection = session.getSelection();
this.$onCursorChange = this.onCursorChange.bind(this); this.$onCursorChange = this.onCursorChange.bind(this);
this.session.addEventListener("changeOverwrite", this.$onCursorChange);
this.selection = session.getSelection();
this.selection.addEventListener("changeCursor", this.$onCursorChange); this.selection.addEventListener("changeCursor", this.$onCursorChange);
this.$onSelectionChange = this.onSelectionChange.bind(this); this.$onSelectionChange = this.onSelectionChange.bind(this);
this.selection.addEventListener("changeSelection", this.$onSelectionChange); this.selection.addEventListener("changeSelection", this.$onSelectionChange);
this.onDocumentModeChange(); this.onChangeMode();
this.bgTokenizer.setDocument(session.getDocument()); this.bgTokenizer.setDocument(session.getDocument());
this.bgTokenizer.start(0); this.bgTokenizer.start(0);
@ -183,8 +185,8 @@ var Editor =function(renderer, session) {
this.onSelectionChange(); this.onSelectionChange();
this.onChangeFrontMarker(); this.onChangeFrontMarker();
this.onChangeBackMarker(); this.onChangeBackMarker();
this.onDocumentChangeBreakpoint(); this.onChangeBreakpoint();
this.onDocumentChangeAnnotation(); this.onChangeAnnotation();
this.renderer.scrollToRow(session.getScrollTopRow()); this.renderer.scrollToRow(session.getScrollTopRow());
this.renderer.updateFull(); this.renderer.updateFull();
@ -281,7 +283,7 @@ var Editor =function(renderer, session) {
this.renderer.updateLines(range.start.row, lastRow); this.renderer.updateLines(range.start.row, lastRow);
// update cursor because tab characters can influence the cursor position // update cursor because tab characters can influence the cursor position
this.renderer.updateCursor(this.getCursorPosition(), this.$overwrite); this.renderer.updateCursor();
}; };
this.onTokenizerUpdate = function(e) { this.onTokenizerUpdate = function(e) {
@ -290,7 +292,7 @@ var Editor =function(renderer, session) {
}; };
this.onCursorChange = function(e) { this.onCursorChange = function(e) {
this.renderer.updateCursor(this.getCursorPosition(), this.$overwrite); this.renderer.updateCursor();
if (!this.$blockScrolling) { if (!this.$blockScrolling) {
this.renderer.scrollCursorIntoView(); this.renderer.scrollCursorIntoView();
@ -347,15 +349,15 @@ var Editor =function(renderer, session) {
this.renderer.updateBackMarkers(); this.renderer.updateBackMarkers();
}; };
this.onDocumentChangeBreakpoint = function() { this.onChangeBreakpoint = function() {
this.renderer.setBreakpoints(this.session.getBreakpoints()); this.renderer.setBreakpoints(this.session.getBreakpoints());
}; };
this.onDocumentChangeAnnotation = function() { this.onChangeAnnotation = function() {
this.renderer.setAnnotations(this.session.getAnnotations()); this.renderer.setAnnotations(this.session.getAnnotations());
}; };
this.onDocumentModeChange = function() { this.onChangeMode = function() {
var mode = this.session.getMode(); var mode = this.session.getMode();
if (this.mode == mode) if (this.mode == mode)
return; return;
@ -374,12 +376,11 @@ var Editor =function(renderer, session) {
this.renderer.setTokenizer(this.bgTokenizer); this.renderer.setTokenizer(this.bgTokenizer);
}; };
this.onDocumentChangeWrapLimit = function() { this.onChangeWrapLimit = function() {
this.renderer.updateCursor(this.getCursorPosition(), this.$overwrite);
this.renderer.updateFull(); this.renderer.updateFull();
}; };
this.onDocumentChangeWrapMode = function() { this.onChangeWrapMode = function() {
this.renderer.onResize(true); this.renderer.onResize(true);
}; };
@ -413,7 +414,8 @@ var Editor =function(renderer, session) {
if (!this.selection.isEmpty()) { if (!this.selection.isEmpty()) {
var cursor = this.session.remove(this.getSelectionRange()); var cursor = this.session.remove(this.getSelectionRange());
this.clearSelection(); this.clearSelection();
} else if (this.$overwrite){ }
else if (this.session.getOverwrite()) {
var range = new Range.fromPoints(cursor, cursor); var range = new Range.fromPoints(cursor, cursor);
range.end.column += text.length; range.end.column += text.length;
this.session.remove(range); this.session.remove(range);
@ -427,14 +429,18 @@ var Editor =function(renderer, session) {
var lineIndent = this.mode.getNextLineIndent(lineState, line.slice(0, cursor.column), this.session.getTabString()); var lineIndent = this.mode.getNextLineIndent(lineState, line.slice(0, cursor.column), this.session.getTabString());
var end = this.session.insert(cursor, text); var end = this.session.insert(cursor, text);
this.moveCursorToPosition(end);
var lineState = this.bgTokenizer.getState(cursor.row); var lineState = this.bgTokenizer.getState(cursor.row);
// multi line insert // TODO disabled multiline auto indent
if (cursor.row !== end.row) { // possibly doing the indent before inserting the text
// if (cursor.row !== end.row) {
if (this.session.getDocument().isNewLine(text)) {
this.moveCursorTo(cursor.row+1, 0);
var size = this.session.getTabSize(), var size = this.session.getTabSize(),
minIndent = Number.MAX_VALUE; minIndent = Number.MAX_VALUE;
for (var row = cursor.row + 1; row <= end.row; ++row) { for (var row = cursor.row + 1; row <= end.row; ++row) {
var indent = 0; var indent = 0;
@ -477,25 +483,16 @@ var Editor =function(renderer, session) {
this.keyBinding.onCommandKey(e, hashId, keyCode); this.keyBinding.onCommandKey(e, hashId, keyCode);
}; };
this.$overwrite = false;
this.setOverwrite = function(overwrite) { this.setOverwrite = function(overwrite) {
if (this.$overwrite == overwrite) return; this.session.setOverwrite();
this.$overwrite = overwrite;
this.$blockScrolling += 1;
this.onCursorChange();
this.$blockScrolling -= 1;
this._dispatchEvent("changeOverwrite", {data: overwrite});
}; };
this.getOverwrite = function() { this.getOverwrite = function() {
return this.$overwrite; return this.session.getOverwrite();
}; };
this.toggleOverwrite = function() { this.toggleOverwrite = function() {
this.setOverwrite(!this.$overwrite); this.session.toggleOverwrite();
}; };
this.setScrollSpeed = function(speed) { this.setScrollSpeed = function(speed) {
@ -758,6 +755,13 @@ var Editor =function(renderer, session) {
}); });
}; };
this.moveText = function(range, toPosition) {
if (this.$readOnly)
return null;
return this.session.moveText(range, toPosition);
};
this.copyLinesUp = function() { this.copyLinesUp = function() {
if (this.$readOnly) if (this.$readOnly)
return; return;

View file

@ -42,19 +42,13 @@ var useragent = require("pilot/useragent");
var keyUtil = require("pilot/keys"); var keyUtil = require("pilot/keys");
var event = require("pilot/event"); var event = require("pilot/event");
var settings = require("pilot/settings").settings; var settings = require("pilot/settings").settings;
var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
var default_mac = require("ace/keyboard/keybinding/default_mac").bindings;
var default_win = require("ace/keyboard/keybinding/default_win").bindings;
var canon = require("pilot/canon"); var canon = require("pilot/canon");
require("ace/commands/default_commands"); require("ace/commands/default_commands");
var KeyBinding = function(editor, config) { var KeyBinding = function(editor) {
this.$editor = editor; this.$editor = editor;
this.$data = { }; this.$data = { };
this.$keyboardHandler = null; this.$keyboardHandler = null;
this.$defaulKeyboardHandler = new HashHandler(config || (useragent.isMac
? default_mac
: default_win));
}; };
(function() { (function() {
@ -70,7 +64,9 @@ var KeyBinding = function(editor, config) {
}; };
this.$callKeyboardHandler = function (e, hashId, keyOrText, keyCode) { this.$callKeyboardHandler = function (e, hashId, keyOrText, keyCode) {
var toExecute; var env = {editor: this.$editor},
toExecute;
if (this.$keyboardHandler) { if (this.$keyboardHandler) {
toExecute = toExecute =
this.$keyboardHandler.handleKeyboard(this.$data, hashId, keyOrText, keyCode, e); this.$keyboardHandler.handleKeyboard(this.$data, hashId, keyOrText, keyCode, e);
@ -78,13 +74,23 @@ var KeyBinding = function(editor, config) {
// If there is nothing to execute yet, then use the default keymapping. // If there is nothing to execute yet, then use the default keymapping.
if (!toExecute || !toExecute.command) { if (!toExecute || !toExecute.command) {
toExecute = this.$defaulKeyboardHandler. if (hashId != 0 || keyCode != 0) {
handleKeyboard(this.$data, hashId, keyOrText, keyCode, e); toExecute = {
command: canon.findKeyCommand(env, "editor", hashId, keyOrText)
}
} else {
toExecute = {
command: "inserttext",
args: {
text: keyOrText
}
}
}
} }
if (toExecute) { if (toExecute) {
var success = canon.exec(toExecute.command, var success = canon.exec(toExecute.command,
{editor: this.$editor}, toExecute.args); env, "editor", toExecute.args);
if (success) { if (success) {
return event.stopEvent(e); return event.stopEvent(e);
} }
@ -92,10 +98,8 @@ var KeyBinding = function(editor, config) {
}; };
this.onCommandKey = function(e, hashId, keyCode) { this.onCommandKey = function(e, hashId, keyCode) {
key = (keyUtil[keyCode] || var keyString = keyUtil.keyCodeToString(keyCode);
String.fromCharCode(keyCode)).toLowerCase(); this.$callKeyboardHandler(e, hashId, keyString, keyCode);
this.$callKeyboardHandler(e, hashId, key, keyCode);
}; };
this.onTextInput = function(text) { this.onTextInput = function(text) {

View file

@ -1,97 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
exports.bindings = {
"selectall": "Command-A",
"removeline": "Command-D",
"gotoline": "Command-L",
"togglecomment": "Command-7",
"findnext": "Command-K",
"findprevious": "Command-Shift-K",
"find": "Command-F",
"replace": "Command-R",
"undo": "Command-Z",
"redo": "Command-Shift-Z|Command-Y",
"overwrite": "Insert",
"copylinesup": "Command-Option-Up",
"movelinesup": "Option-Up",
"selecttostart": "Command-Shift-Up",
"gotostart": "Command-Home|Command-Up",
"selectup": "Shift-Up",
"golineup": "Up|Ctrl-P",
"copylinesdown": "Command-Option-Down",
"movelinesdown": "Option-Down",
"selecttoend": "Command-Shift-Down",
"gotoend": "Command-End|Command-Down",
"selectdown": "Shift-Down",
"golinedown": "Down|Ctrl-N",
"selectwordleft": "Option-Shift-Left",
"gotowordleft": "Option-Left",
"selecttolinestart": "Command-Shift-Left",
"gotolinestart": "Command-Left|Home|Ctrl-A",
"selectleft": "Shift-Left",
"gotoleft": "Left|Ctrl-B",
"selectwordright": "Option-Shift-Right",
"gotowordright": "Option-Right",
"selecttolineend": "Command-Shift-Right",
"gotolineend": "Command-Right|End|Ctrl-E",
"selectright": "Shift-Right",
"gotoright": "Right|Ctrl-F",
"selectpagedown": "Shift-PageDown",
"pagedown": "PageDown",
"gotopagedown": "Option-PageDown|Ctrl-V",
"selectpageup": "Shift-PageUp",
"pageup": "PageUp",
"gotopageup": "Option-PageUp",
"selectlinestart": "Shift-Home",
"selectlineend": "Shift-End",
"del": "Delete|Ctrl-D",
"backspace": "Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H",
"removetolineend": "Ctrl-K",
"removetolinestart": "Option-Backspace",
"removewordleft": "Alt-Backspace|Ctrl-Alt-Backspace",
"removewordright": "Alt-Delete",
"outdent": "Shift-Tab",
"indent": "Tab",
"transposeletters": "Ctrl-T",
"splitline": "Ctrl-O",
"centerselection": "Ctrl-L"
};
});

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -39,10 +40,11 @@ define(function(require, exports, module) {
var event = require("pilot/event"); var event = require("pilot/event");
var useragent = require("pilot/useragent"); var useragent = require("pilot/useragent");
var dom = require("pilot/dom");
var TextInput = function(parentNode, host) { var TextInput = function(parentNode, host) {
var text = document.createElement("textarea"); var text = dom.createElement("textarea");
text.style.left = "-10000px"; text.style.left = "-10000px";
parentNode.appendChild(text); parentNode.appendChild(text);

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -41,11 +42,11 @@ define(function(require, exports, module) {
var dom = require("pilot/dom"); var dom = require("pilot/dom");
var Cursor = function(parentEl) { var Cursor = function(parentEl) {
this.element = document.createElement("div"); this.element = dom.createElement("div");
this.element.className = "ace_layer ace_cursor-layer"; this.element.className = "ace_layer ace_cursor-layer";
parentEl.appendChild(this.element); parentEl.appendChild(this.element);
this.cursor = document.createElement("div"); this.cursor = dom.createElement("div");
this.cursor.className = "ace_cursor"; this.cursor.className = "ace_cursor";
this.isVisible = false; this.isVisible = false;
@ -57,17 +58,6 @@ var Cursor = function(parentEl) {
this.session = session; this.session = session;
}; };
this.setCursor = function(position, overwrite) {
this.position =
this.session.documentToScreenPosition(position);
if (overwrite) {
dom.addCssClass(this.cursor, "ace_overwrite");
} else {
dom.removeCssClass(this.cursor, "ace_overwrite");
}
};
this.hideCursor = function() { this.hideCursor = function() {
this.isVisible = false; this.isVisible = false;
if (this.cursor.parentNode) { if (this.cursor.parentNode) {
@ -101,14 +91,15 @@ var Cursor = function(parentEl) {
}; };
this.getPixelPosition = function(onScreen) { this.getPixelPosition = function(onScreen) {
if (!this.config || !this.position) { if (!this.config || !this.session) {
return { return {
left : 0, left : 0,
top : 0 top : 0
}; };
} }
var pos = this.position; var position = this.session.selection.getCursor();
var pos = this.session.documentToScreenPosition(position);
var cursorLeft = Math.round(pos.column * this.config.characterWidth); var cursorLeft = Math.round(pos.column * this.config.characterWidth);
var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
this.config.lineHeight; this.config.lineHeight;
@ -120,9 +111,6 @@ var Cursor = function(parentEl) {
}; };
this.update = function(config) { this.update = function(config) {
if (!this.position)
return;
this.config = config; this.config = config;
this.pixelPos = this.getPixelPosition(true); this.pixelPos = this.getPixelPosition(true);
@ -135,6 +123,13 @@ var Cursor = function(parentEl) {
if (this.isVisible) { if (this.isVisible) {
this.element.appendChild(this.cursor); this.element.appendChild(this.cursor);
} }
if (this.session.getOverwrite()) {
dom.addCssClass(this.cursor, "ace_overwrite");
} else {
dom.removeCssClass(this.cursor, "ace_overwrite");
}
this.restartTimer(); this.restartTimer();
}; };

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -41,7 +42,7 @@ define(function(require, exports, module) {
var dom = require("pilot/dom"); var dom = require("pilot/dom");
var Gutter = function(parentEl) { var Gutter = function(parentEl) {
this.element = document.createElement("div"); this.element = dom.createElement("div");
this.element.className = "ace_layer ace_gutter-layer"; this.element.className = "ace_layer ace_gutter-layer";
parentEl.appendChild(this.element); parentEl.appendChild(this.element);
@ -83,7 +84,7 @@ var Gutter = function(parentEl) {
}; };
for (var i=0; i<rowAnnotations.length; i++) { for (var i=0; i<rowAnnotations.length; i++) {
var annotation = rowAnnotations[i]; var annotation = rowAnnotations[i];
rowInfo.text.push(annotation.text.replace(/"/g, "&quot;").replace(/'/g, "&rsquo;").replace(/</, "&lt;")); rowInfo.text.push(annotation.text.replace(/"/g, "&quot;").replace(/'/g, "&#8217;").replace(/</, "&lt;"));
var type = annotation.type; var type = annotation.type;
if (type == "error") if (type == "error")
rowInfo.className = "ace_error"; rowInfo.className = "ace_error";
@ -110,7 +111,6 @@ var Gutter = function(parentEl) {
annotation.className, annotation.className,
"' title='", annotation.text.join("\n"), "' title='", annotation.text.join("\n"),
"' style='height:", this.session.getRowHeight(config, i), "px;'>", (i+1), "</div>"); "' style='height:", this.session.getRowHeight(config, i), "px;'>", (i+1), "</div>");
html.push("</div>");
} }
this.element = dom.setInnerHtml(this.element, html.join("")); this.element = dom.setInnerHtml(this.element, html.join(""));
this.element.style.height = config.minHeight + "px"; this.element.style.height = config.minHeight + "px";

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -42,7 +43,7 @@ var Range = require("ace/range").Range;
var dom = require("pilot/dom"); var dom = require("pilot/dom");
var Marker = function(parentEl) { var Marker = function(parentEl) {
this.element = document.createElement("div"); this.element = dom.createElement("div");
this.element.className = "ace_layer ace_marker-layer"; this.element.className = "ace_layer ace_marker-layer";
parentEl.appendChild(this.element); parentEl.appendChild(this.element);
}; };

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -21,6 +22,7 @@
* Contributor(s): * Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> * Fabian Jakobs <fabian AT ajax DOT org>
* Julian Viereck <julian.viereck@gmail.com> * Julian Viereck <julian.viereck@gmail.com>
* Mihai Sucan <mihai.sucan@gmail.com>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -44,7 +46,7 @@ var lang = require("pilot/lang");
var EventEmitter = require("pilot/event_emitter").EventEmitter; var EventEmitter = require("pilot/event_emitter").EventEmitter;
var Text = function(parentEl) { var Text = function(parentEl) {
this.element = document.createElement("div"); this.element = dom.createElement("div");
this.element.className = "ace_layer ace_text-layer"; this.element.className = "ace_layer ace_text-layer";
parentEl.appendChild(this.element); parentEl.appendChild(this.element);
@ -95,22 +97,31 @@ var Text = function(parentEl) {
this.$measureSizes = function() { this.$measureSizes = function() {
var n = 1000; var n = 1000;
if (!this.$measureNode) { if (!this.$measureNode) {
var measureNode = this.$measureNode = document.createElement("div"); var measureNode = this.$measureNode = dom.createElement("div");
var style = measureNode.style; var style = measureNode.style;
style.width = style.height = "auto"; style.width = style.height = "auto";
style.left = style.top = (-n * 40) + "px"; style.left = style.top = (-n * 40) + "px";
style.visibility = "hidden"; style.visibility = "hidden";
style.position = "absolute"; style.position = "absolute";
style.overflow = "visible"; style.overflow = "visible";
style.whiteSpace = "nowrap"; style.whiteSpace = "nowrap";
// in FF 3.6 monospace fonts can have a fixed sub pixel width.
// that's why we have to measure many characters
// Note: characterWidth can be a float!
measureNode.innerHTML = lang.stringRepeat("Xy", n);
if (document.body) {
document.body.appendChild(measureNode);
} else {
var container = this.element.parentNode;
while (!dom.hasCssClass(container, "ace_editor"))
container = container.parentNode;
container.appendChild(measureNode);
}
// in FF 3.6 monospace fonts can have a fixed sub pixel width.
// that's why we have to measure many characters
// Note: characterWidth can be a float!
measureNode.innerHTML = lang.stringRepeat("Xy", n);
document.body.insertBefore(measureNode, document.body.firstChild);
} }
var style = this.$measureNode.style; var style = this.$measureNode.style;
@ -144,12 +155,12 @@ var Text = function(parentEl) {
if (this.showInvisibles) { if (this.showInvisibles) {
var halfTab = (tabSize) / 2; var halfTab = (tabSize) / 2;
this.$tabString = "<span class='ace_invisible'>" this.$tabString = "<span class='ace_invisible'>"
+ new Array(Math.floor(halfTab)).join("&nbsp;") + new Array(Math.floor(halfTab)).join("&#160;")
+ this.TAB_CHAR + this.TAB_CHAR
+ new Array(Math.ceil(halfTab)+1).join("&nbsp;") + new Array(Math.ceil(halfTab)+1).join("&#160;")
+ "</span>"; + "</span>";
} else { } else {
this.$tabString = new Array(tabSize+1).join("&nbsp;"); this.$tabString = new Array(tabSize+1).join("&#160;");
} }
}; };
@ -220,7 +231,7 @@ var Text = function(parentEl) {
var fragment = document.createDocumentFragment(); var fragment = document.createDocumentFragment();
var tokens = this.tokenizer.getTokens(firstRow, lastRow); var tokens = this.tokenizer.getTokens(firstRow, lastRow);
for (var row=firstRow; row<=lastRow; row++) { for (var row=firstRow; row<=lastRow; row++) {
var lineEl = document.createElement("div"); var lineEl = dom.createElement("div");
lineEl.className = "ace_line"; lineEl.className = "ace_line";
var style = lineEl.style; var style = lineEl.style;
style.height = this.session.getRowHeight(config, row) + "px"; style.height = this.session.getRowHeight(config, row) + "px";
@ -228,7 +239,7 @@ var Text = function(parentEl) {
var html = []; var html = [];
if (tokens.length > row-firstRow) if (tokens.length > row-firstRow)
this.$renderLine(html, row, tokens[row-firstRow].tokens); this.$renderLine(html, row, tokens[row-firstRow].tokens);
// don't use setInnerHtml since we are working with an empty DIV // don't use setInnerHtml since we are working with an empty DIV
lineEl.innerHTML = html.join(""); lineEl.innerHTML = html.join("");
fragment.appendChild(lineEl); fragment.appendChild(lineEl);
@ -261,7 +272,7 @@ var Text = function(parentEl) {
var spaceRe = /( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])/g; var spaceRe = /( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])/g;
var spaceReplace = function(space) { var spaceReplace = function(space) {
if (space.charCodeAt(0) == 32) if (space.charCodeAt(0) == 32)
return new Array(space.length+1).join("&nbsp;"); return new Array(space.length+1).join("&#160;");
else { else {
var space = new Array(space.length+1).join(self.SPACE_CHAR); var space = new Array(space.length+1).join(self.SPACE_CHAR);
return "<span class='ace_invisible'>" + space + "</span>"; return "<span class='ace_invisible'>" + space + "</span>";
@ -271,7 +282,7 @@ var Text = function(parentEl) {
} }
else { else {
var spaceRe = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/g; var spaceRe = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/g;
var spaceReplace = "&nbsp;"; var spaceReplace = "&#160;";
} }
var _self = this; var _self = this;

54
lib/ace/mode/csharp.js Normal file
View file

@ -0,0 +1,54 @@
define(function(require, exports, module) {
var oop = require("pilot/oop");
var TextMode = require("ace/mode/text").Mode;
var Tokenizer = require("ace/tokenizer").Tokenizer;
var CSharpHighlightRules = require("ace/mode/csharp_highlight_rules").CSharpHighlightRules;
var MatchingBraceOutdent = require("ace/mode/matching_brace_outdent").MatchingBraceOutdent;
var Mode = function() {
this.$tokenizer = new Tokenizer(new CSharpHighlightRules().getRules());
this.$outdent = new MatchingBraceOutdent();
};
oop.inherits(Mode, TextMode);
(function() {
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
var tokens = tokenizedLine.tokens;
var endState = tokenizedLine.state;
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
if (state == "start") {
var match = line.match(/^.*[\{\(\[]\s*$/);
if (match) {
indent += tab;
}
}
return indent;
};
this.checkOutdent = function(state, line, input) {
return this.$outdent.checkOutdent(line, input);
};
this.autoOutdent = function(state, doc, row) {
this.$outdent.autoOutdent(doc, row);
};
this.createWorker = function(session) {
return null;
};
}).call(Mode.prototype);
exports.Mode = Mode;
});

View file

@ -0,0 +1,123 @@
define(function(require, exports, module) {
var oop = require("pilot/oop");
var lang = require("pilot/lang");
var DocCommentHighlightRules = require("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules;
var CSharpHighlightRules = function() {
var docComment = new DocCommentHighlightRules();
var keywords = lang.arrayToMap(
("abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic").split("|")
);
var buildinConstants = lang.arrayToMap(
("null|true|false").split("|")
);
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
this.$rules = {
"start" : [
{
token : "comment",
regex : "\\/\\/.*$"
},
docComment.getStartRule("doc-start"),
{
token : "comment", // multi line comment
regex : "\\/\\*",
next : "comment"
}, {
token : "comment", // multi line comment
regex : "\\/\\*\\*",
next : "comment"
}, {
token : "string.regexp",
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
}, {
token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // single line
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "constant.numeric", // hex
regex : "0[xX][0-9a-fA-F]+\\b"
}, {
token : "constant.numeric", // float
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
}, {
token : "constant.language.boolean",
regex : "(?:true|false)\\b"
}, {
token : function(value) {
if (value == "this")
return "variable.language";
else if (keywords.hasOwnProperty(value))
return "keyword";
else if (buildinConstants.hasOwnProperty(value))
return "constant.language";
else
return "identifier";
},
// TODO: Unicode escape sequences
// TODO: Unicode identifiers
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
}, {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
token : "lparen",
regex : "[[({]"
}, {
token : "rparen",
regex : "[\\])}]"
}, {
token : "text",
regex : "\\s+"
}
],
"comment" : [
{
token : "comment", // closing comment
regex : ".*?\\*\\/",
next : "start"
}, {
token : "comment", // comment spanning whole line
regex : ".+"
}
],
"qqstring" : [
{
token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next : "start"
}, {
token : "string",
regex : '.+'
}
],
"qstring" : [
{
token : "string",
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
next : "start"
}, {
token : "string",
regex : '.+'
}
]
};
this.addRules(docComment.getRules(), "doc-");
this.$rules["doc-start"][0].next = "start";
};
oop.inherits(CSharpHighlightRules, TextHighlightRules);
exports.CSharpHighlightRules = CSharpHighlightRules;
});

View file

@ -65,102 +65,105 @@ var JavaScriptHighlightRules = function() {
this.$rules = { this.$rules = {
"start" : [ "start" : [
{ {
token : "comment", token : "comment",
regex : "\\/\\/.*$" regex : "\\/\\/.*$"
}, },
docComment.getStartRule("doc-start"), docComment.getStartRule("doc-start"),
{ {
token : "comment", // multi line comment token : "comment", // multi line comment
regex : "\\/\\*", regex : "\\/\\*",
next : "comment" next : "comment"
}, { }, {
token : "string.regexp", token : "string.regexp",
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
}, { }, {
token : "string", // single line token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, { }, {
token : "string", // multi line string start token : "string", // multi line string start
regex : '["].*\\\\$', regex : '["].*\\\\$',
next : "qqstring" next : "qqstring"
}, { }, {
token : "string", // single line token : "string", // single line
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, { }, {
token : "string", // multi line string start token : "string", // multi line string start
regex : "['].*\\\\$", regex : "['].*\\\\$",
next : "qstring" next : "qstring"
}, { }, {
token : "constant.numeric", // hex token : "constant.numeric", // hex
regex : "0[xX][0-9a-fA-F]+\\b" regex : "0[xX][0-9a-fA-F]+\\b"
}, { }, {
token : "constant.numeric", // float token : "constant.numeric", // float
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
}, { }, {
token : "constant.language.boolean", token : "constant.language.boolean",
regex : "(?:true|false)\\b" regex : "(?:true|false)\\b"
}, { }, {
token : function(value) { token : function(value) {
if (value == "this") if (value == "this")
return "variable.language"; return "variable.language";
else if (keywords.hasOwnProperty(value)) else if (keywords.hasOwnProperty(value))
return "keyword"; return "keyword";
else if (buildinConstants.hasOwnProperty(value)) else if (buildinConstants.hasOwnProperty(value))
return "constant.language"; return "constant.language";
else if (futureReserved.hasOwnProperty(value)) else if (futureReserved.hasOwnProperty(value))
return "invalid.illegal"; return "invalid.illegal";
else if (value == "debugger") else if (value == "debugger")
return "invalid.deprecated"; return "invalid.deprecated";
else else
return "identifier"; return "identifier";
}, },
// TODO: Unicode escape sequences // TODO: Unicode escape sequences
// TODO: Unicode identifiers // TODO: Unicode identifiers
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
}, { }, {
token : "keyword.operator", token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, { }, {
token : "lparen", token : "lparen",
regex : "[[({]" regex : "[[({]"
}, { }, {
token : "rparen", token : "rparen",
regex : "[\\])}]" regex : "[\\])}]"
}, { }, {
token : "text", token: "comment",
regex : "\\s+" regex: "^#!.*$"
} }, {
token : "text",
regex : "\\s+"
}
], ],
"comment" : [ "comment" : [
{ {
token : "comment", // closing comment token : "comment", // closing comment
regex : ".*?\\*\\/", regex : ".*?\\*\\/",
next : "start" next : "start"
}, { }, {
token : "comment", // comment spanning whole line token : "comment", // comment spanning whole line
regex : ".+" regex : ".+"
} }
], ],
"qqstring" : [ "qqstring" : [
{ {
token : "string", token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next : "start" next : "start"
}, { }, {
token : "string", token : "string",
regex : '.+' regex : '.+'
} }
], ],
"qstring" : [ "qstring" : [
{ {
token : "string", token : "string",
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
next : "start" next : "start"
}, { }, {
token : "string", token : "string",
regex : '.+' regex : '.+'
} }
] ]
}; };

View file

@ -3,7 +3,8 @@ define(function(require, exports, module) {
var oop = require("pilot/oop"); var oop = require("pilot/oop");
var Mirror = require("ace/worker/mirror").Mirror; var Mirror = require("ace/worker/mirror").Mirror;
var lint = require("ace/worker/jslint").JSLINT; //var lint = require("ace/worker/jslint").JSLINT;
var lint = require("ace/worker/jshint").JSHINT;
var JavaScriptWorker = exports.JavaScriptWorker = function(sender) { var JavaScriptWorker = exports.JavaScriptWorker = function(sender) {
Mirror.call(this, sender); Mirror.call(this, sender);

View file

@ -449,7 +449,7 @@ var PhpHighlightRules = function() {
); );
var builtinVariables = lang.arrayToMap( var builtinVariables = lang.arrayToMap(
('$_GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' + ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' +
'$http_response_header|$argc|$argv').split('|') '$http_response_header|$argc|$argv').split('|')
); );

93
lib/ace/mode/svg.js Normal file
View file

@ -0,0 +1,93 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var oop = require("pilot/oop");
var XmlMode = require("ace/mode/text").Mode;
var JavaScriptMode = require("ace/mode/javascript").Mode;
var Tokenizer = require("ace/tokenizer").Tokenizer;
var SvgHighlightRules = require("ace/mode/svg_highlight_rules").SvgHighlightRules;
var Mode = function() {
this.$tokenizer = new Tokenizer(new SvgHighlightRules().getRules());
this.$js = new JavaScriptMode();
};
oop.inherits(Mode, XmlMode);
(function() {
this.toggleCommentLines = function(state, doc, startRow, endRow) {
this.$delegate("toggleCommentLines", arguments, function() {
return 0;
});
};
this.getNextLineIndent = function(state, line, tab) {
var self = this;
return this.$delegate("getNextLineIndent", arguments, function() {
return self.$getIndent(line);
});
};
this.checkOutdent = function(state, line, input) {
return this.$delegate("checkOutdent", arguments, function() {
return false;
});
};
this.autoOutdent = function(state, doc, row) {
this.$delegate("autoOutdent", arguments);
};
this.$delegate = function(method, args, defaultHandler) {
var state = args[0];
var split = state.split("js-");
if (!split[0] && split[1]) {
args[0] = split[1];
return this.$js[method].apply(this.$js, args);
}
return defaultHandler ? defaultHandler() : undefined;
};
}).call(Mode.prototype);
exports.Mode = Mode;
});

View file

@ -37,52 +37,51 @@
define(function(require, exports, module) { define(function(require, exports, module) {
exports.bindings = { var oop = require("pilot/oop");
"selectall": "Ctrl-A", var JavaScriptHighlightRules = require("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules;
"removeline": "Ctrl-D", var XmlHighlightRules = require("ace/mode/xml_highlight_rules").XmlHighlightRules;
"gotoline": "Ctrl-L",
"togglecomment": "Ctrl-7", var SvgHighlightRules = function() {
"findnext": "Ctrl-K", XmlHighlightRules.call(this);
"findprevious": "Ctrl-Shift-K",
"find": "Ctrl-F", this.$rules.start.splice(3, 0, {
"replace": "Ctrl-R", token : "text",
"undo": "Ctrl-Z", regex : "<(?=\s*script)",
"redo": "Ctrl-Shift-Z|Ctrl-Y", next : "script"
"overwrite": "Insert", });
"copylinesup": "Ctrl-Alt-Up", this.$rules.script = [{
"movelinesup": "Alt-Up", token : "text",
"selecttostart": "Alt-Shift-Up", regex : ">",
"gotostart": "Ctrl-Home|Ctrl-Up", next : "js-start"
"selectup": "Shift-Up", }, {
"golineup": "Up", token : "keyword",
"copylinesdown": "Ctrl-Alt-Down", regex : "[-_a-zA-Z0-9:]+"
"movelinesdown": "Alt-Down", }, {
"selecttoend": "Alt-Shift-Down", token : "text",
"gotoend": "Ctrl-End|Ctrl-Down", regex : "\\s+"
"selectdown": "Shift-Down", }, {
"golinedown": "Down", token : "string",
"selectwordleft": "Ctrl-Shift-Left", regex : '".*?"'
"gotowordleft": "Ctrl-Left", }, {
"selecttolinestart": "Alt-Shift-Left", token : "string",
"gotolinestart": "Alt-Left|Home", regex : "'.*?'"
"selectleft": "Shift-Left", }];
"gotoleft": "Left",
"selectwordright": "Ctrl-Shift-Right", var jsRules = new JavaScriptHighlightRules().getRules();
"gotowordright": "Ctrl-Right", this.addRules(jsRules, "js-");
"selecttolineend": "Alt-Shift-Right", this.$rules["js-start"].unshift({
"gotolineend": "Alt-Right|End", token: "comment",
"selectright": "Shift-Right", regex: "\\/\\/.*(?=<\\/script>)",
"gotoright": "Right", next: "tag"
"selectpagedown": "Shift-PageDown", }, {
"gotopagedown": "PageDown", token: "text",
"selectpageup": "Shift-PageUp", regex: "<\\/(?=script)",
"gotopageup": "PageUp", next: "tag"
"selectlinestart": "Shift-Home", });
"selectlineend": "Shift-End",
"del": "Delete",
"backspace": "Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace",
"outdent": "Shift-Tab",
"indent": "Tab"
}; };
oop.inherits(SvgHighlightRules, XmlHighlightRules);
exports.SvgHighlightRules = SvgHighlightRules;
}); });

View file

@ -94,22 +94,25 @@ var Mode = function() {
var startOuter = selection.start.column - 1; var startOuter = selection.start.column - 1;
var endOuter = selection.end.column + 1; var endOuter = selection.end.column + 1;
var line = session.getLine(selection.start.row); var line = session.getLine(selection.start.row);
var lineCols = line.length - 1; var lineCols = line.length;
var needle = line.substring(Math.max(startOuter, 0), var needle = line.substring(Math.max(startOuter, 0),
Math.min(endOuter, lineCols)); Math.min(endOuter, lineCols));
// Make sure the outer characters are not part of the word. // Make sure the outer characters are not part of the word.
if ((startOuter >= 0 && !/[^\w\d]/.test(needle.charAt(0))) || if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
(endOuter <= lineCols && !/[^\w\d]/.test(needle.charAt(needle.length - 1)))) (endOuter <= lineCols && /[\w\d]$/.test(needle)))
return; return;
needle = line.substring(selection.start.column, selection.end.column); needle = line.substring(selection.start.column, selection.end.column);
if (!/^[\w\d]+$/.test(needle)) if (!/^[\w\d]+$/.test(needle))
return; return;
var cursor = editor.getCursorPosition();
var newOptions = { var newOptions = {
wrap: true, wrap: true,
wholeWord: true, wholeWord: true,
caseSensitive: true,
needle: needle needle: needle
}; };
@ -117,9 +120,8 @@ var Mode = function() {
editor.$search.set(newOptions); editor.$search.set(newOptions);
var ranges = editor.$search.findAll(session); var ranges = editor.$search.findAll(session);
session.$selectionOccurrences = [];
ranges.forEach(function(range) { ranges.forEach(function(range) {
if (!range.contains(selection.start.row, selection.start.column)) { if (!range.contains(cursor.row, cursor.column)) {
var marker = session.addMarker(range, "ace_selected_word"); var marker = session.addMarker(range, "ace_selected_word");
session.$selectionOccurrences.push(marker); session.$selectionOccurrences.push(marker);
} }
@ -135,6 +137,8 @@ var Mode = function() {
editor.session.$selectionOccurrences.forEach(function(marker) { editor.session.$selectionOccurrences.forEach(function(marker) {
editor.session.removeMarker(marker); editor.session.removeMarker(marker);
}); });
editor.session.$selectionOccurrences = [];
}; };
}).call(Mode.prototype); }).call(Mode.prototype);

76
lib/ace/mode/textile.js Normal file
View file

@ -0,0 +1,76 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kelley van Evert <kelley.vanevert@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var oop = require("pilot/oop");
var TextMode = require("ace/mode/text").Mode;
var Tokenizer = require("ace/tokenizer").Tokenizer;
var TextileHighlightRules = require("ace/mode/textile_highlight_rules").TextileHighlightRules;
var MatchingBraceOutdent = require("ace/mode/matching_brace_outdent").MatchingBraceOutdent;
var Range = require("ace/range").Range;
var Mode = function()
{
this.$tokenizer = new Tokenizer(new TextileHighlightRules().getRules());
this.$outdent = new MatchingBraceOutdent();
};
oop.inherits(Mode, TextMode);
(function()
{
this.getNextLineIndent = function(state, line, tab)
{
if (state == "intag")
return tab;
return "";
};
this.checkOutdent = function(state, line, input) {
return this.$outdent.checkOutdent(line, input);
};
this.autoOutdent = function(state, doc, row) {
this.$outdent.autoOutdent(doc, row);
};
}).call(Mode.prototype);
exports.Mode = Mode;
});

View file

@ -0,0 +1,110 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kelley van Evert <kelley.vanevert@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var oop = require("pilot/oop");
var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules;
var TextileHighlightRules = function()
{
/*
var phraseModifiers = lang.arrayToMap(
("_|*|__|**|??|-|+|^|%|@").split("|")
);
var blockModifiers = lang.arrayToMap(
("h1|h2|h3|h4|h5|h6|bq|p|bc|pre").split("|")
);
*/
/*
var punctuation = lang.arrayToMap(
("-|--|(tm)|(r)|(c)").split("|")
);
*/
this.$rules = {
"start" : [
{
token : "keyword", // start of block
regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre",
next : "blocktag"
},
{
token : "keyword",
regex : "[\\*]+|[#]+"
},
{
token : "text",
regex : ".+"
}
],
"blocktag" : [
{
token : "keyword",
regex : "\\. ",
next : "start",
},
{
token : "keyword",
regex : "\\(",
next : "blocktagproperties"
},
],
"blocktagproperties" : [
{
token : "keyword",
regex : "\\)",
next : "blocktag"
},
{
token : "string",
regex : "[a-zA-Z0-9\\-_]+"
},
{
token : "keyword",
regex : "#"
},
]
};
};
oop.inherits(TextileHighlightRules, TextHighlightRules);
exports.TextileHighlightRules = TextileHighlightRules;
});

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -20,6 +21,7 @@
* *
* Contributor(s): * Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> * Fabian Jakobs <fabian AT ajax DOT org>
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -38,6 +40,14 @@
define(function(require, exports, module) { define(function(require, exports, module) {
var event = require("pilot/event"); var event = require("pilot/event");
var dom = require("pilot/dom");
var STATE_UNKNOWN = 0;
var STATE_SELECT = 1;
var STATE_DRAG = 2;
var DRAG_TIMER = 250; // milliseconds
var DRAG_OFFSET = 5; // pixels
var MouseHandler = function(editor) { var MouseHandler = function(editor) {
this.editor = editor; this.editor = editor;
@ -53,6 +63,7 @@ var MouseHandler = function(editor) {
event.addListener(mouseTarget, "mousedown", this.onMouseDown.bind(this)); event.addListener(mouseTarget, "mousedown", this.onMouseDown.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, this.onMouseDoubleClick.bind(this)); event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, this.onMouseDoubleClick.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, this.onMouseTripleClick.bind(this)); event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, this.onMouseTripleClick.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 4, 600, this.onMouseQuadClick.bind(this));
event.addMouseWheelListener(mouseTarget, this.onMouseWheel.bind(this)); event.addMouseWheelListener(mouseTarget, this.onMouseWheel.bind(this));
}; };
@ -67,39 +78,56 @@ var MouseHandler = function(editor) {
return this.$scrollSpeed; return this.$scrollSpeed;
}; };
this.$getEventPosition = function(e) {
var pageX = event.getDocumentX(e);
var pageY = event.getDocumentY(e);
var pos = this.editor.renderer.screenToTextCoordinates(pageX, pageY);
pos.row = Math.max(0, Math.min(pos.row, this.editor.session.getLength()-1));
return pos;
};
this.$distance = function(ax, ay, bx, by) {
return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
};
this.onMouseDown = function(e) { this.onMouseDown = function(e) {
var pageX = event.getDocumentX(e); var pageX = event.getDocumentX(e);
var pageY = event.getDocumentY(e); var pageY = event.getDocumentY(e);
var pos = this.$getEventPosition(e);
var editor = this.editor; var editor = this.editor;
var self = this;
var pos = editor.renderer.screenToTextCoordinates(pageX, pageY); var selectionRange = editor.getSelectionRange();
pos.row = Math.max(0, Math.min(pos.row, editor.session.getLength()-1)); var selectionEmpty = selectionRange.isEmpty();
var state = STATE_UNKNOWN;
var inSelection = false;
var button = event.getButton(e) var button = event.getButton(e)
if (button != 0) { if (button != 0) {
var isEmpty = editor.selection.isEmpty() if (selectionEmpty) {
if (isEmpty) {
editor.moveCursorToPosition(pos); editor.moveCursorToPosition(pos);
} }
if(button == 2) { if(button == 2) {
editor.textInput.onContextMenu({x: pageX, y: pageY}, isEmpty); editor.textInput.onContextMenu({x: pageX, y: pageY}, selectionEmpty);
event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose); event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
} }
return; return;
} } else
inSelection = !editor.getReadOnly() &&
!selectionEmpty &&
selectionRange.contains(pos.row, pos.column);
if (e.shiftKey) if (!inSelection) {
editor.selection.selectToPosition(pos) // Directly pick STATE_SELECT, since the user is not clicking inside
else { // a selection.
editor.moveCursorToPosition(pos); onStartSelect(pos);
if (!editor.$clickSelection)
editor.selection.clearSelection(pos.row, pos.column);
} }
editor.renderer.scrollCursorIntoView(); editor.renderer.scrollCursorIntoView();
var self = this;
var mousePageX, mousePageY; var mousePageX, mousePageY;
var overwrite = editor.getOverwrite();
var mousedownTime = (new Date()).getTime();
var dragCursor, dragRange;
var onMouseSelection = function(e) { var onMouseSelection = function(e) {
mousePageX = event.getDocumentX(e); mousePageX = event.getDocumentX(e);
@ -108,13 +136,88 @@ var MouseHandler = function(editor) {
var onMouseSelectionEnd = function() { var onMouseSelectionEnd = function() {
clearInterval(timerId); clearInterval(timerId);
if (state == STATE_UNKNOWN)
onStartSelect(pos);
else if (state == STATE_DRAG)
onMouseDragSelectionEnd();
self.$clickSelection = null; self.$clickSelection = null;
state = STATE_UNKNOWN;
};
var onMouseDragSelectionEnd = function() {
dom.removeCssClass(editor.container, "ace_dragging");
editor.session.removeMarker(dragSelectionMarker);
if (!self.$clickSelection) {
if (!dragCursor) {
editor.moveCursorToPosition(pos);
editor.selection.clearSelection(pos.row, pos.column);
}
}
if (!dragCursor)
return;
if (dragRange.contains(dragCursor.row, dragCursor.column)) {
dragCursor = null;
return;
}
editor.clearSelection();
var newRange = editor.moveText(dragRange, dragCursor);
if (!newRange) {
dragCursor = null;
return;
}
editor.selection.setSelectionRange(newRange);
}; };
var onSelectionInterval = function() { var onSelectionInterval = function() {
if (mousePageX === undefined || mousePageY === undefined) if (mousePageX === undefined || mousePageY === undefined)
return; return;
if (state == STATE_UNKNOWN) {
var distance = self.$distance(pageX, pageY, mousePageX, mousePageY);
var time = (new Date()).getTime();
if (distance > DRAG_OFFSET) {
state = STATE_SELECT;
var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
onStartSelect(cursor);
} else if ((time - mousedownTime) > DRAG_TIMER) {
state = STATE_DRAG;
dragRange = editor.getSelectionRange();
var style = editor.getSelectionStyle();
dragSelectionMarker = editor.session.addMarker(dragRange, "ace_selection", style);
editor.clearSelection();
dom.addCssClass(editor.container, "ace_dragging");
}
}
if (state == STATE_DRAG)
onDragSelectionInterval();
else if (state == STATE_SELECT)
onUpdateSelectionInterval();
};
function onStartSelect(pos) {
if (e.shiftKey)
editor.selection.selectToPosition(pos)
else {
if (!self.$clickSelection) {
editor.moveCursorToPosition(pos);
editor.selection.clearSelection(pos.row, pos.column);
}
}
state = STATE_SELECT;
}
var onUpdateSelectionInterval = function() {
var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY); var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1)); cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
@ -138,6 +241,14 @@ var MouseHandler = function(editor) {
editor.renderer.scrollCursorIntoView(); editor.renderer.scrollCursorIntoView();
}; };
var onDragSelectionInterval = function() {
dragCursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
dragCursor.row = Math.max(0, Math.min(dragCursor.row,
editor.session.getLength() - 1));
editor.moveCursorToPosition(dragCursor);
};
event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
var timerId = setInterval(onSelectionInterval, 20); var timerId = setInterval(onSelectionInterval, 20);
@ -145,15 +256,24 @@ var MouseHandler = function(editor) {
}; };
this.onMouseDoubleClick = function(e) { this.onMouseDoubleClick = function(e) {
var pos = this.$getEventPosition(e);
this.editor.moveCursorToPosition(pos);
this.editor.selection.selectWord(); this.editor.selection.selectWord();
this.$clickSelection = this.editor.getSelectionRange(); this.$clickSelection = this.editor.getSelectionRange();
}; };
this.onMouseTripleClick = function(e) { this.onMouseTripleClick = function(e) {
var pos = this.$getEventPosition(e);
this.editor.moveCursorToPosition(pos);
this.editor.selection.selectLine(); this.editor.selection.selectLine();
this.$clickSelection = this.editor.getSelectionRange(); this.$clickSelection = this.editor.getSelectionRange();
}; };
this.onMouseQuadClick = function(e) {
this.editor.selectAll();
this.$clickSelection = this.editor.getSelectionRange();
};
this.onMouseWheel = function(e) { this.onMouseWheel = function(e) {
var speed = this.$scrollSpeed * 2; var speed = this.$scrollSpeed * 2;

View file

@ -43,16 +43,16 @@ var event = require("pilot/event");
var EventEmitter = require("pilot/event_emitter").EventEmitter; var EventEmitter = require("pilot/event_emitter").EventEmitter;
var ScrollBar = function(parent) { var ScrollBar = function(parent) {
this.element = document.createElement("div"); this.element = dom.createElement("div");
this.element.className = "ace_sb"; this.element.className = "ace_sb";
this.inner = document.createElement("div"); this.inner = dom.createElement("div");
this.element.appendChild(this.inner); this.element.appendChild(this.inner);
parent.appendChild(this.element); parent.appendChild(this.element);
this.width = dom.scrollbarWidth(); this.width = dom.scrollbarWidth();
this.element.style.width = this.width; this.element.style.width = this.width + "px";
event.addListener(this.element, "scroll", this.onScroll.bind(this)); event.addListener(this.element, "scroll", this.onScroll.bind(this));
}; };
@ -69,7 +69,7 @@ var ScrollBar = function(parent) {
}; };
this.setHeight = function(height) { this.setHeight = function(height) {
this.element.style.height = Math.max(0, height - this.width) + "px"; this.element.style.height = height + "px";
}; };
this.setInnerHeight = function(height) { this.setInnerHeight = function(height) {

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -20,6 +21,7 @@
* *
* Contributor(s): * Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> * Fabian Jakobs <fabian AT ajax DOT org>
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -219,12 +221,16 @@ Search.SELECTION = 2;
var lastRow = searchSelection ? range.end.row : session.getLength() - 1; var lastRow = searchSelection ? range.end.row : session.getLength() - 1;
var wrap = this.$options.wrap; var wrap = this.$options.wrap;
var inWrap = false;
function getLine(row) { function getLine(row) {
var line = session.getLine(row); var line = session.getLine(row);
if (searchSelection && row == range.end.row) { if (searchSelection && row == range.end.row) {
line = line.substring(0, range.end.column); line = line.substring(0, range.end.column);
} }
if (inWrap && row == start.row) {
line = line.substring(0, start.column);
}
return line; return line;
} }
@ -236,6 +242,7 @@ Search.SELECTION = 2;
var startIndex = start.column; var startIndex = start.column;
var stop = false; var stop = false;
inWrap = false;
while (!callback(line, startIndex, row)) { while (!callback(line, startIndex, row)) {
@ -250,6 +257,7 @@ Search.SELECTION = 2;
if (wrap) { if (wrap) {
row = firstRow; row = firstRow;
startIndex = firstColumn; startIndex = firstColumn;
inWrap = true;
} else { } else {
return; return;
} }
@ -283,6 +291,7 @@ Search.SELECTION = 2;
var line = session.getLine(row).substring(0, start.column); var line = session.getLine(row).substring(0, start.column);
var startIndex = 0; var startIndex = 0;
var stop = false; var stop = false;
var inWrap = false;
while (!callback(line, startIndex, row)) { while (!callback(line, startIndex, row)) {
@ -295,6 +304,7 @@ Search.SELECTION = 2;
if (row < firstRow) { if (row < firstRow) {
if (wrap) { if (wrap) {
row = lastRow; row = lastRow;
inWrap = true;
} else { } else {
return; return;
} }
@ -310,6 +320,9 @@ Search.SELECTION = 2;
else if (row == lastRow) else if (row == lastRow)
line = line.substring(0, range.end.column); line = line.substring(0, range.end.column);
} }
if (inWrap && row == start.row)
startIndex = start.column;
} }
} }
}; };

View file

@ -42,15 +42,14 @@ var oop = require("pilot/oop");
var lang = require("pilot/lang"); var lang = require("pilot/lang");
var EventEmitter = require("pilot/event_emitter").EventEmitter; var EventEmitter = require("pilot/event_emitter").EventEmitter;
var Range = require("ace/range").Range; var Range = require("ace/range").Range;
var Anchor = require("ace/anchor").Anchor;
var Selection = function(session) { var Selection = function(session) {
this.session = session; this.session = session;
this.doc = session.getDocument(); this.doc = session.getDocument();
this.clearSelection(); this.clearSelection();
this.selectionLead = new Anchor(this.doc, 0, 0); this.selectionLead = this.doc.createAnchor(0, 0);
this.selectionAnchor = new Anchor(this.doc, 0, 0); this.selectionAnchor = this.doc.createAnchor(0, 0);
var _self = this; var _self = this;
this.selectionLead.on("change", function(e) { this.selectionLead.on("change", function(e) {

View file

@ -51,6 +51,7 @@ async.concat(
require("./search_test"), require("./search_test"),
require("./selection_test"), require("./selection_test"),
require("./text_edit_test"), require("./text_edit_test"),
require("./highlight_selected_word_test"),
require("./mode/css_test"), require("./mode/css_test"),
require("./mode/css_tokenizer_test"), require("./mode/css_tokenizer_test"),
require("./mode/html_test"), require("./mode/html_test"),

View file

@ -20,6 +20,7 @@ async.concat(
require("./selection_test"), require("./selection_test"),
require("./text_edit_test"), require("./text_edit_test"),
require("./virtual_renderer_test"), require("./virtual_renderer_test"),
require("./highlight_selected_word_test"),
require("./mode/css_test"), require("./mode/css_test"),
require("./mode/css_tokenizer_test"), require("./mode/css_tokenizer_test"),
require("./mode/html_test"), require("./mode/html_test"),

View file

@ -138,7 +138,7 @@ var Test = {
}, },
"test: should use mode of new document" : function() { "test: should use mode of new document" : function() {
this.editor.onDocumentModeChange = function() { this.editor.onChangeMode = function() {
called = true; called = true;
}; };
this.editor.setSession(this.session1); this.editor.setSession(this.session1);

View file

@ -254,13 +254,13 @@ var Test = {
assert.equal(doc.getValue(), ["1", "2", "3"].join("\n")); assert.equal(doc.getValue(), ["1", "2", "3"].join("\n"));
}, },
"test: set new line mode to 'windows' should use '\r\n' as new lines": function() { "test: set new line mode to 'windows' should use '\\r\\n' as new lines": function() {
var doc = new Document(["1", "2", "3"].join("\n")); var doc = new Document(["1", "2", "3"].join("\n"));
doc.setNewLineMode("windows"); doc.setNewLineMode("windows");
assert.equal(doc.getValue(), ["1", "2", "3"].join("\r\n")); assert.equal(doc.getValue(), ["1", "2", "3"].join("\r\n"));
}, },
"test: set new line mode to 'unix' should use '\n' as new lines": function() { "test: set new line mode to 'unix' should use '\\n' as new lines": function() {
var doc = new Document(["1", "2", "3"].join("\r\n")); var doc = new Document(["1", "2", "3"].join("\r\n"));
doc.setNewLineMode("unix"); doc.setNewLineMode("unix");

View file

@ -325,6 +325,20 @@ var Test = {
assert.equal(session.$wrapData.length, 2); assert.equal(session.$wrapData.length, 2);
assert.equal(session.$wrapData[0].length, 1); assert.equal(session.$wrapData[0].length, 1);
assert.equal(session.$wrapData[1].length, 1); assert.equal(session.$wrapData[1].length, 1);
},
"test first line blank with wrap": function() {
var session = new EditSession("\nfoo");
session.setUseWrapMode(true);
assert.equal(session.doc.getValue(), ["", "foo"].join("\n"));
},
"test first line blank with wrap 2" : function() {
var session = new EditSession("");
session.setUseWrapMode(true);
session.setValue("\nfoo");
assert.equal(session.doc.getValue(), ["", "foo"].join("\n"));
} }
}; };

View file

@ -0,0 +1,213 @@
/* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Mihai Sucan.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mihai Sucan <mihai.sucan@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var EditSession = require("ace/edit_session").EditSession,
Editor = require("../editor").Editor,
MockRenderer = require("./mockrenderer"),
TextMode = require("ace/mode/text").Mode,
assert = require("./assertions"),
async = require("asyncjs");
var lipsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
"Mauris at arcu mi, eu lobortis mauris. Quisque ut libero eget " +
"diam congue vehicula. Quisque ut odio ut mi aliquam tincidunt. " +
"Duis lacinia aliquam lorem eget eleifend. Morbi eget felis mi. " +
"Duis quam ligula, consequat vitae convallis volutpat, blandit " +
"nec neque. Nulla facilisi. Etiam suscipit lorem ac justo " +
"sollicitudin tristique. Phasellus ut posuere nunc. Aliquam " +
"scelerisque mollis felis non gravida. Vestibulum lacus sem, " +
"posuere non bibendum id, luctus non dolor. Aenean id metus " +
"lorem, vel dapibus est. Donec gravida feugiat augue nec " +
"accumsan.Lorem ipsum dolor sit amet, consectetur adipiscing " +
"elit. Nulla vulputate, velit vitae tincidunt congue, nunc " +
"augue accumsan velit, eu consequat turpis lectus ac orci. " +
"Pellentesque ornare dolor feugiat dui auctor eu varius nulla " +
"fermentum. Sed aliquam odio at velit lacinia vel fermentum " +
"felis sodales. In dignissim magna eget nunc lobortis non " +
"fringilla nibh ullamcorper. Donec facilisis malesuada elit " +
"at egestas. Etiam bibendum, diam vitae tempor aliquet, dui " +
"libero vehicula odio, eget bibendum mauris velit eu lorem.\n" +
"consectetur";
var Test = {
setUp: function(next) {
this.session = new EditSession(lipsum);
this.editor = new Editor(new MockRenderer(), this.session);
this.selection = this.session.getSelection();
this.search = this.editor.$search;
next();
},
"test: highlight selected words by default": function() {
assert.equal(this.editor.getHighlightSelectedWord(), true);
},
"test: highlight a word": function() {
this.editor.moveCursorTo(0, 9);
this.selection.selectWord();
var range = this.selection.getRange();
assert.equal(this.session.getTextRange(range), "ipsum");
assert.equal(this.session.$selectionOccurrences.length, 1);
},
"test: highlight a word and clear highlight": function() {
this.editor.moveCursorTo(0, 8);
this.selection.selectWord();
var range = this.selection.getRange();
assert.equal(this.session.getTextRange(range), "ipsum");
assert.equal(this.session.$selectionOccurrences.length, 1);
this.session.getMode().clearSelectionHighlight(this.editor);
assert.equal(this.session.$selectionOccurrences.length, 0);
},
"test: highlight another word": function() {
this.selection.moveCursorTo(0, 14);
this.selection.selectWord();
var range = this.selection.getRange();
assert.equal(this.session.getTextRange(range), "dolor");
assert.equal(this.session.$selectionOccurrences.length, 3);
},
"test: no selection, no highlight": function() {
this.selection.clearSelection();
assert.equal(this.session.$selectionOccurrences.length, 0);
},
"test: select a word, no highlight": function() {
this.editor.setHighlightSelectedWord(false);
this.selection.moveCursorTo(0, 14);
this.selection.selectWord();
var range = this.selection.getRange();
assert.equal(this.session.getTextRange(range), "dolor");
assert.equal(this.session.$selectionOccurrences.length, 0);
},
"test: select a word with no matches": function() {
this.editor.setHighlightSelectedWord(true);
var currentOptions = this.search.getOptions();
var newOptions = {
wrap: true,
wholeWord: true,
caseSensitive: true,
needle: "Mauris"
};
this.search.set(newOptions);
var match = this.search.find(this.session);
assert.notEqual(match, null, "found a match for 'Mauris'");
this.search.set(currentOptions);
this.selection.setSelectionRange(match);
assert.equal(this.session.getTextRange(match), "Mauris");
assert.equal(this.session.$selectionOccurrences.length, 0);
},
"test: partial word selection 1": function() {
this.selection.moveCursorTo(0, 14);
this.selection.selectWord();
this.selection.selectLeft();
var range = this.selection.getRange();
assert.equal(this.session.getTextRange(range), "dolo");
assert.equal(this.session.$selectionOccurrences.length, 0);
},
"test: partial word selection 2": function() {
this.selection.moveCursorTo(0, 13);
this.selection.selectWord();
this.selection.selectRight();
var range = this.selection.getRange();
assert.equal(this.session.getTextRange(range), "dolor ");
assert.equal(this.session.$selectionOccurrences.length, 0);
},
"test: partial word selection 3": function() {
this.selection.moveCursorTo(0, 14);
this.selection.selectWord();
this.selection.selectLeft();
this.selection.shiftSelection(1);
var range = this.selection.getRange();
assert.equal(this.session.getTextRange(range), "olor");
assert.equal(this.session.$selectionOccurrences.length, 0);
},
"test: select last word": function() {
this.selection.moveCursorTo(0, 1);
var currentOptions = this.search.getOptions();
var newOptions = {
wrap: true,
wholeWord: true,
caseSensitive: true,
backwards: true,
needle: "consectetur"
};
this.search.set(newOptions);
var match = this.search.find(this.session);
assert.notEqual(match, null, "found a match for 'consectetur'");
assert.position(match.start, 1, 0);
this.search.set(currentOptions);
this.selection.setSelectionRange(match);
assert.equal(this.session.getTextRange(match), "consectetur");
assert.equal(this.session.$selectionOccurrences.length, 2);
},
};
module.exports = require("asyncjs/test").testcase(Test);
});
if (typeof module !== "undefined" && module === require.main) {
require("../../../support/paths");
exports.exec()
}

View file

@ -39,11 +39,6 @@ define(function(require, exports, module) {
MockRenderer = function(visibleRowCount) { MockRenderer = function(visibleRowCount) {
this.container = document.createElement("div"); this.container = document.createElement("div");
this.cursor = {
row : 0,
column : 0
};
this.visibleRowCount = visibleRowCount || 20; this.visibleRowCount = visibleRowCount || 20;
this.layerConfig = { this.layerConfig = {
@ -89,9 +84,7 @@ MockRenderer.prototype.getSession = function(session) {
MockRenderer.prototype.setTokenizer = function() { MockRenderer.prototype.setTokenizer = function() {
}; };
MockRenderer.prototype.updateCursor = function(position) { MockRenderer.prototype.updateCursor = function() {
this.cursor.row = position.row;
this.cursor.column = position.column;
}; };
MockRenderer.prototype.scrollToLine = function(line, center) { MockRenderer.prototype.scrollToLine = function(line, center) {
@ -108,11 +101,12 @@ MockRenderer.prototype.scrollToLine = function(line, center) {
}; };
MockRenderer.prototype.scrollCursorIntoView = function() { MockRenderer.prototype.scrollCursorIntoView = function() {
if (this.cursor.row < this.layerConfig.firstVisibleRow) { var cursor = this.session.getSelection().getCursor();
this.scrollToRow(this.cursor.row); if (cursor.row < this.layerConfig.firstVisibleRow) {
this.scrollToRow(cursor.row);
} }
else if (this.cursor.row > this.layerConfig.lastVisibleRow) { else if (cursor.row > this.layerConfig.lastVisibleRow) {
this.scrollToRow(this.cursor.row); this.scrollToRow(cursor.row);
} }
}; };

View file

@ -98,6 +98,11 @@ var Test = {
assert.equal(1, tokens.length); assert.equal(1, tokens.length);
assert.equal("rparen", tokens[0].type); assert.equal("rparen", tokens[0].type);
},
"test tokenize regular expressions": function() {
var tokens = this.tokenizer.getLineTokens("a/b/c", "start").tokens;
assert.equal(5, tokens.length);
} }
}; };

View file

@ -20,6 +20,7 @@
* *
* Contributor(s): * Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> * Fabian Jakobs <fabian AT ajax DOT org>
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -341,7 +342,52 @@ var Test = {
assert.equal(search.replace("ab12", "cd$1"), "cd12"); assert.equal(search.replace("ab12", "cd$1"), "cd12");
assert.equal(search.replace("ab12", "-$&-"), "-ab12-"); assert.equal(search.replace("ab12", "-$&-"), "-ab12-");
assert.equal(search.replace("ab12", "$$"), "$"); assert.equal(search.replace("ab12", "$$"), "$");
} },
"test: find all matches in a line" : function() {
var session = new EditSession("foo bar foo baz foobar foo");
var search = new Search().set({
needle: "foo",
wrap: true,
wholeWord: true,
});
session.getSelection().moveCursorTo(0, 4);
var ranges = search.findAll(session);
assert.equal(ranges.length, 3);
assert.position(ranges[0].start, 0, 8);
assert.position(ranges[0].end, 0, 11);
assert.position(ranges[1].start, 0, 23);
assert.position(ranges[1].end, 0, 26);
assert.position(ranges[2].start, 0, 0);
assert.position(ranges[2].end, 0, 3);
},
"test: find all matches in a line backwards" : function() {
var session = new EditSession("foo bar foo baz foobar foo");
var search = new Search().set({
needle: "foo",
wrap: true,
wholeWord: true,
backwards: true,
});
session.getSelection().moveCursorTo(0, 13);
var ranges = search.findAll(session);
assert.equal(ranges.length, 3);
assert.position(ranges[0].start, 0, 8);
assert.position(ranges[0].end, 0, 11);
assert.position(ranges[1].start, 0, 0);
assert.position(ranges[1].end, 0, 3);
assert.position(ranges[2].start, 0, 23);
assert.position(ranges[2].end, 0, 26);
},
}; };
module.exports = require("asyncjs/test").testcase(Test) module.exports = require("asyncjs/test").testcase(Test)

View file

@ -287,6 +287,42 @@ var Test = {
selection.moveCursorTo(0, 5); selection.moveCursorTo(0, 5);
assert.notOk(called); assert.notOk(called);
},
"test: moveWordLeft should move past || and [": function() {
var session = new EditSession("||foo[");
var selection = session.getSelection();
// Move behind ||
selection.moveCursorWordRight();
assert.position(selection.getCursor(), 0, 2);
// Move beind foo
selection.moveCursorWordRight();
assert.position(selection.getCursor(), 0, 5);
// Move behind [
selection.moveCursorWordRight();
assert.position(selection.getCursor(), 0, 6);
},
"test: moveWordRight should move past || and [": function() {
var session = new EditSession("||foo[");
var selection = session.getSelection();
selection.moveCursorTo(0, 6);
// Move behind [
selection.moveCursorWordLeft();
assert.position(selection.getCursor(), 0, 5);
// Move beind foo
selection.moveCursorWordLeft();
assert.position(selection.getCursor(), 0, 2);
// Move behind ||
selection.moveCursorWordLeft();
assert.position(selection.getCursor(), 0, 0);
} }
}; };

View file

@ -53,6 +53,7 @@ var Test = {
document.body.appendChild(el); document.body.appendChild(el);
var renderer = new VirtualRenderer(el); var renderer = new VirtualRenderer(el);
renderer.setPadding(0);
renderer.setSession(new EditSession("1234")); renderer.setSession(new EditSession("1234"));
renderer.characterWidth = 10; renderer.characterWidth = 10;

View file

@ -146,7 +146,7 @@ background-color:#FF0000;\
}\ }\
\ \
.ace-idle-fingers .ace_support {\ .ace-idle-fingers .ace_support {\
color:#bc9458;\ \
}\ }\
\ \
.ace-idle-fingers .ace_support.ace_function {\ .ace-idle-fingers .ace_support.ace_function {\
@ -167,7 +167,7 @@ background-color:#FF0000;\
\ \
.ace-idle-fingers .ace_comment {\ .ace-idle-fingers .ace_comment {\
font-style:italic;\ font-style:italic;\
color:#BC9458;\ color:#BC9458;\
}\ }\
\ \
.ace-idle-fingers .ace_comment.ace_doc {\ .ace-idle-fingers .ace_comment.ace_doc {\
@ -179,15 +179,20 @@ background-color:#FF0000;\
}\ }\
\ \
.ace-idle-fingers .ace_variable {\ .ace-idle-fingers .ace_variable {\
color:#b7dff8;\ \
}\ }\
\ \
.ace-idle-fingers .ace_variable.ace_language {\ .ace-idle-fingers .ace_variable.ace_language {\
color:#b7dff8;\ \
}\ }\
\ \
.ace-idle-fingers .ace_xml_pe {\ .ace-idle-fingers .ace_xml_pe {\
\ \
}\
\
.ace-idle-fingers .ace_collab.ace_user1 {\
color:#323232;\
background-color:#FFF980; \
}"; }";
// import CSS once // import CSS once

197
lib/ace/theme/merbivore.js Normal file
View file

@ -0,0 +1,197 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Michael Schwartz <mr.pants AT gmail DOT com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-merbivore .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-merbivore .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-merbivore .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-merbivore .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-merbivore .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-merbivore .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-merbivore .ace_scroller {\
background-color: #161616;\
}\
\
.ace-merbivore .ace_text-layer {\
cursor: text;\
color: #E6E1DC;\
}\
\
.ace-merbivore .ace_cursor {\
border-left: 2px solid #FFFFFF;\
}\
\
.ace-merbivore .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FFFFFF;\
}\
\
.ace-merbivore .ace_marker-layer .ace_selection {\
background: #454545;\
}\
\
.ace-merbivore .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-merbivore .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #FCE94F;\
}\
\
.ace-merbivore .ace_marker-layer .ace_active_line {\
background: #333435;\
}\
\
\
.ace-merbivore .ace_invisible {\
color: #404040;\
}\
\
.ace-merbivore .ace_keyword {\
color:#FC6F09;\
}\
\
.ace-merbivore .ace_keyword.ace_operator {\
\
}\
\
.ace-merbivore .ace_constant {\
color:#1EDAFB;\
}\
\
.ace-merbivore .ace_constant.ace_language {\
color:#FDC251;\
}\
\
.ace-merbivore .ace_constant.ace_library {\
color:#8DFF0A;\
}\
\
.ace-merbivore .ace_constant.ace_numeric {\
color:#58C554;\
}\
\
.ace-merbivore .ace_invalid {\
color:#FFFFFF;\
background-color:#990000;\
}\
\
.ace-merbivore .ace_invalid.ace_illegal {\
\
}\
\
.ace-merbivore .ace_invalid.ace_deprecated {\
color:#FFFFFF;\
background-color:#990000;\
}\
\
.ace-merbivore .ace_support {\
\
}\
\
.ace-merbivore .ace_support.ace_function {\
color:#FC6F09;\
}\
\
.ace-merbivore .ace_function.ace_buildin {\
\
}\
\
.ace-merbivore .ace_string {\
color:#8DFF0A;\
}\
\
.ace-merbivore .ace_string.ace_regexp {\
\
}\
\
.ace-merbivore .ace_comment {\
color:#AD2EA4;\
}\
\
.ace-merbivore .ace_comment.ace_doc {\
\
}\
\
.ace-merbivore .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-merbivore .ace_variable {\
\
}\
\
.ace-merbivore .ace_variable.ace_language {\
\
}\
\
.ace-merbivore .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-merbivore";
});

View file

@ -0,0 +1,197 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Michael Schwartz <mr.pants AT gmail DOT com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-merbivore-soft .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-merbivore-soft .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-merbivore-soft .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-merbivore-soft .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-merbivore-soft .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-merbivore-soft .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-merbivore-soft .ace_scroller {\
background-color: #1C1C1C;\
}\
\
.ace-merbivore-soft .ace_text-layer {\
cursor: text;\
color: #E6E1DC;\
}\
\
.ace-merbivore-soft .ace_cursor {\
border-left: 2px solid #FFFFFF;\
}\
\
.ace-merbivore-soft .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FFFFFF;\
}\
\
.ace-merbivore-soft .ace_marker-layer .ace_selection {\
background: #494949;\
}\
\
.ace-merbivore-soft .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-merbivore-soft .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #FCE94F;\
}\
\
.ace-merbivore-soft .ace_marker-layer .ace_active_line {\
background: #333435;\
}\
\
\
.ace-merbivore-soft .ace_invisible {\
color: #404040;\
}\
\
.ace-merbivore-soft .ace_keyword {\
color:#FC803A;\
}\
\
.ace-merbivore-soft .ace_keyword.ace_operator {\
\
}\
\
.ace-merbivore-soft .ace_constant {\
color:#68C1D8;\
}\
\
.ace-merbivore-soft .ace_constant.ace_language {\
color:#E1C582;\
}\
\
.ace-merbivore-soft .ace_constant.ace_library {\
color:#8EC65F;\
}\
\
.ace-merbivore-soft .ace_constant.ace_numeric {\
color:#7FC578;\
}\
\
.ace-merbivore-soft .ace_invalid {\
color:#FFFFFF;\
background-color:#FE3838;\
}\
\
.ace-merbivore-soft .ace_invalid.ace_illegal {\
\
}\
\
.ace-merbivore-soft .ace_invalid.ace_deprecated {\
color:#FFFFFF;\
background-color:#FE3838;\
}\
\
.ace-merbivore-soft .ace_support {\
\
}\
\
.ace-merbivore-soft .ace_support.ace_function {\
color:#FC803A;\
}\
\
.ace-merbivore-soft .ace_function.ace_buildin {\
\
}\
\
.ace-merbivore-soft .ace_string {\
color:#8EC65F;\
}\
\
.ace-merbivore-soft .ace_string.ace_regexp {\
\
}\
\
.ace-merbivore-soft .ace_comment {\
color:#AC4BB8;\
}\
\
.ace-merbivore-soft .ace_comment.ace_doc {\
\
}\
\
.ace-merbivore-soft .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-merbivore-soft .ace_variable {\
\
}\
\
.ace-merbivore-soft .ace_variable.ace_language {\
\
}\
\
.ace-merbivore-soft .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-merbivore-soft";
});

View file

@ -64,9 +64,8 @@ define(function(require, exports, module) {
}\ }\
\ \
.ace-twilight .ace_print_margin {\ .ace-twilight .ace_print_margin {\
border-left: 1px solid #3C3C3C;\ width: 1px;\
width: 100%;\ background: #e8e8e8;\
background: #242424;\
}\ }\
\ \
.ace-twilight .ace_scroller {\ .ace-twilight .ace_scroller {\
@ -85,13 +84,6 @@ define(function(require, exports, module) {
.ace-twilight .ace_cursor.ace_overwrite {\ .ace-twilight .ace_cursor.ace_overwrite {\
border-left: 0px;\ border-left: 0px;\
border-bottom: 1px solid #A7A7A7;\ border-bottom: 1px solid #A7A7A7;\
}\
.ace-twilight.normal-mode .ace_cursor.ace_overwrite {\
border: 1px solid #FFE300;\
background: #766B13;\
}\
.ace-twilight.normal-mode .ace_cursor-layer {\
z-index: 0;\
}\ }\
\ \
.ace-twilight .ace_marker-layer .ace_selection {\ .ace-twilight .ace_marker-layer .ace_selection {\

View file

@ -0,0 +1,197 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Michael Schwartz <mr.pants AT gmail DOT com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-vibrant-ink .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-vibrant-ink .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-vibrant-ink .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-vibrant-ink .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-vibrant-ink .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-vibrant-ink .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-vibrant-ink .ace_scroller {\
background-color: #0F0F0F;\
}\
\
.ace-vibrant-ink .ace_text-layer {\
cursor: text;\
color: #FFFFFF;\
}\
\
.ace-vibrant-ink .ace_cursor {\
border-left: 2px solid #FFFFFF;\
}\
\
.ace-vibrant-ink .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FFFFFF;\
}\
\
.ace-vibrant-ink .ace_marker-layer .ace_selection {\
background: #6699CC;\
}\
\
.ace-vibrant-ink .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-vibrant-ink .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #99CC99;\
}\
\
.ace-vibrant-ink .ace_marker-layer .ace_active_line {\
background: #333333;\
}\
\
\
.ace-vibrant-ink .ace_invisible {\
color: #404040;\
}\
\
.ace-vibrant-ink .ace_keyword {\
color:#FF6600;\
}\
\
.ace-vibrant-ink .ace_keyword.ace_operator {\
\
}\
\
.ace-vibrant-ink .ace_constant {\
\
}\
\
.ace-vibrant-ink .ace_constant.ace_language {\
color:#339999;\
}\
\
.ace-vibrant-ink .ace_constant.ace_library {\
\
}\
\
.ace-vibrant-ink .ace_constant.ace_numeric {\
color:#99CC99;\
}\
\
.ace-vibrant-ink .ace_invalid {\
color:#CCFF33;\
background-color:#000000;\
}\
\
.ace-vibrant-ink .ace_invalid.ace_illegal {\
\
}\
\
.ace-vibrant-ink .ace_invalid.ace_deprecated {\
color:#CCFF33;\
background-color:#000000;\
}\
\
.ace-vibrant-ink .ace_support {\
\
}\
\
.ace-vibrant-ink .ace_support.ace_function {\
color:#FFCC00;\
}\
\
.ace-vibrant-ink .ace_function.ace_buildin {\
\
}\
\
.ace-vibrant-ink .ace_string {\
color:#66FF00;\
}\
\
.ace-vibrant-ink .ace_string.ace_regexp {\
\
}\
\
.ace-vibrant-ink .ace_comment {\
color:#9933CC;\
}\
\
.ace-vibrant-ink .ace_comment.ace_doc {\
\
}\
\
.ace-vibrant-ink .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-vibrant-ink .ace_variable {\
\
}\
\
.ace-vibrant-ink .ace_variable.ace_language {\
\
}\
\
.ace-vibrant-ink .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-vibrant-ink";
});

View file

@ -42,14 +42,15 @@ var Tokenizer = function(rules) {
this.regExps = {}; this.regExps = {};
for ( var key in this.rules) { for ( var key in this.rules) {
var state = this.rules[key]; var rule = this.rules[key];
var state = rule;
var ruleRegExps = []; var ruleRegExps = [];
for ( var i = 0; i < state.length; i++) { for ( var i = 0; i < state.length; i++)
ruleRegExps.push(state[i].regex); ruleRegExps.push(state[i].regex);
};
this.regExps[key] = new RegExp("(?:(" + ruleRegExps.join(")|(") + ")|(.))", "g"); this.regExps[key] = new RegExp("(?:(" + ruleRegExps.join(")|(") + ")|(.))", "g");
} }
}; };
@ -76,19 +77,19 @@ var Tokenizer = function(rules) {
for ( var i = 0; i < state.length; i++) { for ( var i = 0; i < state.length; i++) {
if (match[i + 1]) { if (match[i + 1]) {
if (typeof state[i].token == "function") { var rule = state[i];
type = state[i].token(match[0]);
}
else {
type = state[i].token;
}
if (state[i].next && state[i].next !== currentState) { if (typeof rule.token == "function")
currentState = state[i].next; type = rule.token(match[0]);
var state = this.rules[currentState]; else
var lastIndex = re.lastIndex; type = rule.token;
var re = this.regExps[currentState]; if (rule.next && rule.next !== currentState) {
currentState = rule.next;
state = this.rules[currentState];
lastIndex = re.lastIndex;
re = this.regExps[currentState];
re.lastIndex = lastIndex; re.lastIndex = lastIndex;
} }
break; break;
@ -97,9 +98,9 @@ var Tokenizer = function(rules) {
if (token.type !== type) { if (token.type !== type) {
if (token.type) { if (token.type)
tokens.push(token); tokens.push(token);
}
token = { token = {
type: type, type: type,
value: value value: value
@ -108,16 +109,14 @@ var Tokenizer = function(rules) {
token.value += value; token.value += value;
} }
if (lastIndex == line.length) { if (lastIndex == line.length)
break; break;
}
lastIndex = re.lastIndex; lastIndex = re.lastIndex;
}; };
if (token.type) { if (token.type)
tokens.push(token); tokens.push(token);
}
return { return {
tokens : tokens, tokens : tokens,

View file

@ -1,4 +1,5 @@
/* ***** BEGIN LICENSE BLOCK ***** /* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
@ -20,6 +21,7 @@
* *
* Contributor(s): * Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> * Fabian Jakobs <fabian AT ajax DOT org>
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -38,8 +40,7 @@
define(function(require, exports, module) { define(function(require, exports, module) {
var UndoManager = function() { var UndoManager = function() {
this.$undoStack = []; this.reset();
this.$redoStack = [];
}; };
(function() { (function() {
@ -66,6 +67,19 @@ var UndoManager = function() {
} }
}; };
this.reset = function() {
this.$undoStack = [];
this.$redoStack = [];
};
this.hasUndo = function() {
return this.$undoStack.length > 0;
};
this.hasRedo = function() {
return this.$redoStack.length > 0;
};
}).call(UndoManager.prototype); }).call(UndoManager.prototype);
exports.UndoManager = UndoManager; exports.UndoManager = UndoManager;

View file

@ -62,15 +62,15 @@ var VirtualRenderer = function(container, theme) {
this.setTheme(theme); this.setTheme(theme);
this.$gutter = document.createElement("div"); this.$gutter = dom.createElement("div");
this.$gutter.className = "ace_gutter"; this.$gutter.className = "ace_gutter";
this.container.appendChild(this.$gutter); this.container.appendChild(this.$gutter);
this.scroller = document.createElement("div"); this.scroller = dom.createElement("div");
this.scroller.className = "ace_scroller"; this.scroller.className = "ace_scroller";
this.container.appendChild(this.scroller); this.container.appendChild(this.scroller);
this.content = document.createElement("div"); this.content = dom.createElement("div");
this.content.className = "ace_content"; this.content.className = "ace_content";
this.scroller.appendChild(this.content); this.scroller.appendChild(this.content);
@ -88,6 +88,10 @@ var VirtualRenderer = function(container, theme) {
this.$cursorLayer = new CursorLayer(this.content); this.$cursorLayer = new CursorLayer(this.content);
this.$cursorPadding = 8; this.$cursorPadding = 8;
// Indicates whether the horizontal scrollbar is visible
this.$horizScroll = true;
this.$horizScrollAlwaysVisible = true;
this.scrollBar = new ScrollBar(container); this.scrollBar = new ScrollBar(container);
this.scrollBar.addEventListener("scroll", this.onScroll.bind(this)); this.scrollBar.addEventListener("scroll", this.onScroll.bind(this));
@ -199,7 +203,7 @@ var VirtualRenderer = function(container, theme) {
this.$size.height = height; this.$size.height = height;
this.scroller.style.height = height + "px"; this.scroller.style.height = height + "px";
this.scrollBar.setHeight(height); this.scrollBar.setHeight(this.scroller.clientHeight);
if (this.session) { if (this.session) {
this.scrollToY(this.getScrollTop()); this.scrollToY(this.getScrollTop());
@ -274,6 +278,10 @@ var VirtualRenderer = function(container, theme) {
return this.$printMarginColumn; return this.$printMarginColumn;
}; };
this.getShowGutter = function(){
return this.showGutter;
}
this.setShowGutter = function(show){ this.setShowGutter = function(show){
if(this.showGutter === show) if(this.showGutter === show)
return; return;
@ -289,9 +297,9 @@ var VirtualRenderer = function(container, theme) {
return; return;
if (!this.$printMarginEl) { if (!this.$printMarginEl) {
containerEl = document.createElement("div"); containerEl = dom.createElement("div");
containerEl.className = "ace_print_margin_layer"; containerEl.className = "ace_print_margin_layer";
this.$printMarginEl = document.createElement("div") this.$printMarginEl = dom.createElement("div")
this.$printMarginEl.className = "ace_print_margin"; this.$printMarginEl.className = "ace_print_margin";
containerEl.appendChild(this.$printMarginEl); containerEl.appendChild(this.$printMarginEl);
this.content.insertBefore(containerEl, this.$textLayer.element); this.content.insertBefore(containerEl, this.$textLayer.element);
@ -361,6 +369,18 @@ var VirtualRenderer = function(container, theme) {
this.$updatePrintMargin(); this.$updatePrintMargin();
}; };
this.getHScrollBarAlwaysVisible = function() {
return this.$horizScrollAlwaysVisible;
}
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
if (this.$horizScrollAlwaysVisible != alwaysVisible) {
this.$horizScrollAlwaysVisible = alwaysVisible;
if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
this.$loop.schedule(this.CHANGE_SCROLL);
}
}
this.onScroll = function(e) { this.onScroll = function(e) {
this.scrollToY(e.data); this.scrollToY(e.data);
}; };
@ -446,6 +466,12 @@ var VirtualRenderer = function(container, theme) {
var longestLine = this.$getLongestLine(); var longestLine = this.$getLongestLine();
var widthChanged = !this.layerConfig ? true : (this.layerConfig.width != longestLine); var widthChanged = !this.layerConfig ? true : (this.layerConfig.width != longestLine);
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScrollChanged = this.$horizScroll !== horizScroll;
this.$horizScroll = horizScroll;
if (horizScrollChanged)
this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
var lastRow = firstRow + lineCount; var lastRow = firstRow + lineCount;
@ -480,6 +506,11 @@ var VirtualRenderer = function(container, theme) {
this.content.style.marginTop = (-offset) + "px"; this.content.style.marginTop = (-offset) + "px";
this.content.style.width = longestLine + "px"; this.content.style.width = longestLine + "px";
this.content.style.height = minHeight + "px"; this.content.style.height = minHeight + "px";
// Horizontal scrollbar visibility may have changed, which changes
// the client height of the scroller
if (horizScrollChanged)
this.onResize(true);
}; };
this.$updateLines = function() { this.$updateLines = function() {
@ -545,8 +576,7 @@ var VirtualRenderer = function(container, theme) {
this.$loop.schedule(this.CHANGE_GUTTER); this.$loop.schedule(this.CHANGE_GUTTER);
}; };
this.updateCursor = function(position, overwrite) { this.updateCursor = function() {
this.$cursorLayer.setCursor(position, overwrite);
this.$loop.schedule(this.CHANGE_CURSOR); this.$loop.schedule(this.CHANGE_CURSOR);
}; };
@ -559,6 +589,10 @@ var VirtualRenderer = function(container, theme) {
}; };
this.scrollCursorIntoView = function() { this.scrollCursorIntoView = function() {
// the editor is not visible
if (this.$size.scrollerHeight === 0)
return;
var pos = this.$cursorLayer.getPixelPosition(); var pos = this.$cursorLayer.getPixelPosition();
var left = pos.left + this.$padding; var left = pos.left + this.$padding;
@ -607,17 +641,17 @@ var VirtualRenderer = function(container, theme) {
}; };
this.scrollToLine = function(line, center) { this.scrollToLine = function(line, center) {
var lineHeight = { lineHeight: this.lineHeight }; var lineHeight = { lineHeight: this.lineHeight };
var offset = 0; var offset = 0;
for (var l = 1; l < line; l++) { for (var l = 1; l < line; l++) {
offset += this.session.getRowHeight(lineHeight, l-1); offset += this.session.getRowHeight(lineHeight, l-1);
} }
if (center) { if (center) {
offset -= this.$size.scrollerHeight / 2; offset -= this.$size.scrollerHeight / 2;
} }
this.scrollToY(offset); this.scrollToY(offset);
}; };
this.scrollToY = function(scrollTop) { this.scrollToY = function(scrollTop) {
var maxHeight = this.session.getScreenLength() * this.lineHeight - this.$size.scrollerHeight; var maxHeight = this.session.getScreenLength() * this.lineHeight - this.$size.scrollerHeight;
@ -675,12 +709,12 @@ var VirtualRenderer = function(container, theme) {
this.showComposition = function(position) { this.showComposition = function(position) {
if (!this.$composition) { if (!this.$composition) {
this.$composition = document.createElement("div"); this.$composition = dom.createElement("div");
this.$composition.className = "ace_composition"; this.$composition.className = "ace_composition";
this.content.appendChild(this.$composition); this.content.appendChild(this.$composition);
} }
this.$composition.innerHTML = "&nbsp;"; this.$composition.innerHTML = "&#160;";
var pos = this.$cursorLayer.getPixelPosition(); var pos = this.$cursorLayer.getPixelPosition();
var style = this.$composition.style; var style = this.$composition.style;

5908
lib/ace/worker/jshint.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -30,11 +30,14 @@ var require = function(id) {
require.modules = {}; require.modules = {};
require.tlns = {}; require.tlns = {};
var define = function(id, factory) { var define = function(id, deps, factory) {
if (!factory) { if (arguments.length == 2) {
factory = deps;
} else if (arguments.length == 1) {
factory = id; factory = id;
id = require.id; id = require.id;
} }
if (id.indexOf("text!") === 0) if (id.indexOf("text!") === 0)
return; return;

View file

@ -1,4 +1,5 @@
/** /* vim:ts=4:sts=4:sw=4:
*
* Ajax.org Code Editor (ACE) * Ajax.org Code Editor (ACE)
* *
* @copyright 2010, Ajax.org Services B.V. * @copyright 2010, Ajax.org Services B.V.
@ -42,7 +43,7 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
var _self = this; var _self = this;
this.$worker.onerror = function(e) { this.$worker.onerror = function(e) {
console.log(e); window.console && console.log && console.log(e);
throw e; throw e;
}; };
this.$worker.onmessage = function(e) { this.$worker.onmessage = function(e) {
@ -74,9 +75,15 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
this.$guessBasePath = function() { this.$guessBasePath = function() {
var scripts = document.getElementsByTagName("script"); var scripts = document.getElementsByTagName("script");
for (var i=0; i<scripts.length; i++) { for (var i=0; i<scripts.length; i++) {
var m = scripts[i].src.match(/^(.*\/)ace\.js$/); var src = scripts[i].src || scripts[i].getAttribute("src");
if (m) if (!src) {
return m[1]; continue;
}
var m = src.match(/^(.*\/)ace\.js$|^(.*\/)ace-uncompressed\.js$/);
if (m) {
return m[1] || m[2];
}
} }
return ""; return "";
}; };

@ -1 +1 @@
Subproject commit 1fa3516d4d553af9f6edd81c20023bcfab08c2a3 Subproject commit 33f02ab3af5d755c98b3c58309ac2c62fc6de736

@ -1 +1 @@
Subproject commit 3028dbabffa2f16cbfd45cd5709baa1c34e0ba4d Subproject commit 12fc67b15ce0dbebd9de7da1d948b7f65251bb94

View file

@ -146,3 +146,7 @@
.%cssClass% .ace_xml_pe { .%cssClass% .ace_xml_pe {
%xml_pe% %xml_pe%
} }
.%cssClass% .ace_collab.ace_user1 {
%collab.user1%
}

View file

@ -1,11 +1,48 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) { define(function(require, exports, module) {
var dom = require("pilot/dom"); var dom = require("pilot/dom");
var cssText = %css%; var cssText = %css%;
// import CSS once // import CSS once
dom.importCssString(cssText); dom.importCssString(cssText);
return { exports.cssClass = "%cssClass%";
cssClass: "%cssClass%" });
};
})

View file

@ -1,4 +1,4 @@
var xml = require("../support/node-o3-xml/lib/o3-xml"); var xml = require("../support/node-o3-xml-v4/lib/o3-xml");
var fs = require("fs"); var fs = require("fs");
function plistToJson(el) { function plistToJson(el) {
@ -83,7 +83,9 @@ var supportedScopes = {
"variable": "variable", "variable": "variable",
"variable.language": "variable.language", "variable.language": "variable.language",
"meta.tag.sgml.doctype": "xml_pe" "meta.tag.sgml.doctype": "xml_pe",
"collab.user1": "collab.user1"
}; };
function extractStyles(theme) { function extractStyles(theme) {
@ -159,17 +161,17 @@ function fillTemplate(template, replacements) {
} }
function createTheme(name, styles, cssTemplate, jsTemplate) { function createTheme(name, styles, cssTemplate, jsTemplate) {
styles.cssClass = "ace" + hyphenate(name); styles.cssClass = "ace-" + hyphenate(name);
var css = fillTemplate(cssTemplate, styles); var css = fillTemplate(cssTemplate, styles);
return fillTemplate(jsTemplate, { return fillTemplate(jsTemplate, {
name: name, name: name,
css: '"' + css.replace(/\\/, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\\n") + '"', css: '"' + css.replace(/\\/, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\\n") + '"',
cssClass: "ace" + hyphenate(name) cssClass: "ace-" + hyphenate(name)
}); });
}; };
function hyphenate(str) { function hyphenate(str) {
return str.replace(/([A-Z])/g, "-$1").toLowerCase(); return str.replace(/([A-Z])/g, "-$1").replace("_", "-").toLowerCase();
} }
var cssTemplate = fs.readFileSync(__dirname + "/Theme.tmpl.css", "utf8"); var cssTemplate = fs.readFileSync(__dirname + "/Theme.tmpl.css", "utf8");
@ -192,5 +194,5 @@ for (var name in themes) {
var tmTheme = fs.readFileSync(__dirname + "/tmthemes/" + themes[name] + ".tmTheme", "utf8"); var tmTheme = fs.readFileSync(__dirname + "/tmthemes/" + themes[name] + ".tmTheme", "utf8");
var styles = extractStyles(parseTheme(tmTheme)); var styles = extractStyles(parseTheme(tmTheme));
fs.writeFileSync(__dirname + "/../src/ace/theme/" + name + ".js", createTheme(name, styles, cssTemplate, jsTemplate)); fs.writeFileSync(__dirname + "/../lib/ace/theme/" + name + ".js", createTheme(name, styles, cssTemplate, jsTemplate));
} }

View file

@ -0,0 +1,285 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Merbivore Soft</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#1C1C1C</string>
<key>caret</key>
<string>#FFFFFF</string>
<key>foreground</key>
<string>#E6E1DC</string>
<key>invisibles</key>
<string>#404040</string>
<key>lineHighlight</key>
<string>#333435</string>
<key>selection</key>
<string>#392243E0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Source</string>
<key>scope</key>
<string>source</string>
<key>settings</key>
<dict/>
</dict>
<dict>
<key>name</key>
<string>Comment</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>italic</string>
<key>foreground</key>
<string>#AC4BB8</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keyword</string>
<key>scope</key>
<string>keyword, storage</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FC803A</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function (definition)</string>
<key>scope</key>
<string>entity.name.function, keyword.other.name-of-parameter.objc</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Class (definition)</string>
<key>scope</key>
<string>entity.name</string>
<key>settings</key>
<dict/>
</dict>
<dict>
<key>name</key>
<string>Class inheritence</string>
<key>scope</key>
<string>entity.other.inherited-class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#C984CD</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Number</string>
<key>scope</key>
<string>constant.numeric</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#7FC578</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variable</string>
<key>scope</key>
<string>variable.language, variable.other</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constant</string>
<key>scope</key>
<string>constant</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#68C1D8</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constant (other variable)</string>
<key>scope</key>
<string>variable.other.constant</string>
<key>settings</key>
<dict/>
</dict>
<dict>
<key>name</key>
<string>Constant (built-in)</string>
<key>scope</key>
<string>constant.language</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#E1C582</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String</string>
<key>scope</key>
<string>string</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#8EC65F</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library function</string>
<key>scope</key>
<string>support.function</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library type</string>
<key>scope</key>
<string>support.type</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#68C1D8</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library constant</string>
<key>scope</key>
<string>support.constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#8EC65F</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Markup tag</string>
<key>scope</key>
<string>meta.tag, declaration.tag, entity.name.tag</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FC803A</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Markup tag attribute</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#EAF1A3</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Invalid</string>
<key>scope</key>
<string>invalid</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#FE3838</string>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String interpolation</string>
<key>scope</key>
<string>constant.character.escaped, constant.character.escape, string source, string source.ruby</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#B3E5B4</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff Add</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#6FC58B</string>
<key>foreground</key>
<string>#E6E1DC</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff Remove</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#AC3735</string>
<key>foreground</key>
<string>#E6E1DC</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff Header</string>
<key>scope</key>
<string>meta.diff.header, meta.separator.diff, meta.diff.index, meta.diff.range</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#5A9EE1</string>
</dict>
</dict>
</array>
<key>uuid</key>
<string>B3517E4B-5243-46CF-AB04-9AE7B41DE3F2</string>
</dict>
</plist>

View file

@ -0,0 +1,285 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Merbivore</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#161616</string>
<key>caret</key>
<string>#FFFFFF</string>
<key>foreground</key>
<string>#E6E1DC</string>
<key>invisibles</key>
<string>#404040</string>
<key>lineHighlight</key>
<string>#333435</string>
<key>selection</key>
<string>#5A647EE0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Source</string>
<key>scope</key>
<string>source</string>
<key>settings</key>
<dict/>
</dict>
<dict>
<key>name</key>
<string>Comment</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>italic</string>
<key>foreground</key>
<string>#AD2EA4</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keyword</string>
<key>scope</key>
<string>keyword, storage</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FC6F09</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function (definition)</string>
<key>scope</key>
<string>entity.name.function, keyword.other.name-of-parameter.objc</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Class (definition)</string>
<key>scope</key>
<string>entity.name</string>
<key>settings</key>
<dict/>
</dict>
<dict>
<key>name</key>
<string>Class inheritence</string>
<key>scope</key>
<string>entity.other.inherited-class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FC83FF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Number</string>
<key>scope</key>
<string>constant.numeric</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#58C554</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variable</string>
<key>scope</key>
<string>variable.language, variable.other</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constant</string>
<key>scope</key>
<string>constant</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#1EDAFB</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constant (other variable)</string>
<key>scope</key>
<string>variable.other.constant</string>
<key>settings</key>
<dict/>
</dict>
<dict>
<key>name</key>
<string>Constant (built-in)</string>
<key>scope</key>
<string>constant.language</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FDC251</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String</string>
<key>scope</key>
<string>string</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#8DFF0A</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library function</string>
<key>scope</key>
<string>support.function</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library type</string>
<key>scope</key>
<string>support.type</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#1EDAFB</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library constant</string>
<key>scope</key>
<string>support.constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#8DFF0A</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Markup tag</string>
<key>scope</key>
<string>meta.tag, declaration.tag, entity.name.tag</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FC6F09</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Markup tag attribute</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FFFF89</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Invalid</string>
<key>scope</key>
<string>invalid</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#990000</string>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String interpolation</string>
<key>scope</key>
<string>constant.character.escaped, constant.character.escape, string source, string source.ruby</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#519F50</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff Add</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#144212</string>
<key>foreground</key>
<string>#E6E1DC</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff Remove</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#660000</string>
<key>foreground</key>
<string>#E6E1DC</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff Header</string>
<key>scope</key>
<string>meta.diff.header, meta.separator.diff, meta.diff.index, meta.diff.range</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#2F33AB</string>
</dict>
</dict>
</array>
<key>uuid</key>
<string>2ABC646D-06F3-48A5-94E9-18EF34474C97</string>
</dict>
</plist>

View file

@ -0,0 +1,447 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Vibrant Ink</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#000000</string>
<key>caret</key>
<string>#FFFFFF</string>
<key>foreground</key>
<string>#FFFFFF</string>
<key>invisibles</key>
<string>#404040</string>
<key>lineHighlight</key>
<string>#333300</string>
<key>selection</key>
<string>#35493CE0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Text base</string>
<key>scope</key>
<string>text</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#0F0F0F</string>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Inline Ruby Html</string>
<key>scope</key>
<string>source.ruby.rails.embedded.html</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Ruby Html</string>
<key>scope</key>
<string>text.html.ruby</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#101010</string>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Ruby Number</string>
<key>scope</key>
<string>constant.numeric.ruby</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#CCFF33</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Ruby source</string>
<key>scope</key>
<string>source.ruby</string>
<key>settings</key>
<dict/>
</dict>
<dict>
<key>name</key>
<string>Source base</string>
<key>scope</key>
<string>source</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#000000</string>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Comment</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#9933CC</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constant</string>
<key>scope</key>
<string>constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#339999</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keyword</string>
<key>scope</key>
<string>keyword</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FF6600</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Pre-processor Line</string>
<key>scope</key>
<string>keyword.preprocessor</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#EDF8F9</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Pre-processor Directive</string>
<key>scope</key>
<string>keyword.preprocessor directive</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function name</string>
<key>scope</key>
<string>entity.name.function, storage.type.function.js</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FFCC00</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function argument</string>
<key>scope</key>
<string>variable.parameter</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Block comment</string>
<key>scope</key>
<string>source comment.block</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#070707</string>
<key>foreground</key>
<string>#772CB7</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variable</string>
<key>scope</key>
<string>variable.other</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>ActiveRecord Function</string>
<key>scope</key>
<string>support.function.activerecord.rails</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#999966</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String</string>
<key>scope</key>
<string>string</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#66FF00</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String escapes</string>
<key>scope</key>
<string>string constant.character.escape</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#AAAAAA</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String (executed)</string>
<key>scope</key>
<string>string.interpolated</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#CCCC33</string>
<key>foreground</key>
<string>#000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Regular expression</string>
<key>scope</key>
<string>string.regexp</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#44B4CC</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String (literal)</string>
<key>scope</key>
<string>string.literal</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#CCCC33</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String escapes (executed)</string>
<key>scope</key>
<string>string.interpolated constant.character.escape</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#555555</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Class name</string>
<key>scope</key>
<string>entity.name.class, support.class.js</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Class inheritance</string>
<key>scope</key>
<string>entity.other.inherited-class</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>italic underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag name</string>
<key>scope</key>
<string>entity.name.tag</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Html Meta</string>
<key>scope</key>
<string>meta.tag.inline.any.html, meta.tag.block.any.html</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#FF6600</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag attribute</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>italic</string>
<key>foreground</key>
<string>#99CC99</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Other Keywords</string>
<key>scope</key>
<string>keyword.other</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#DDE93D</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>CSS Selector</string>
<key>scope</key>
<string>meta.selector.css, entity.other.attribute-name.pseudo-class.css, entity.name.tag.wildcard.css, entity.other.attribute-name.id.css, entity.other.attribute-name.class.css</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FF6600</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>CSS Property</string>
<key>scope</key>
<string>support.type.property-name.css</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#999966</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>CSS Other</string>
<key>scope</key>
<string>keyword.other.unit.css, constant.other.rgb-value.css, constant.numeric.css</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Javascript Events</string>
<key>scope</key>
<string>support.function.event-handler.js</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Javascript Operators</string>
<key>scope</key>
<string>keyword.operator.js</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Javascript Keywords</string>
<key>scope</key>
<string>keyword.control.js</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#CCCC66</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Prototype Objects</string>
<key>scope</key>
<string>support.class.prototype.js</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FFFFFF</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Prototype Methods</string>
<key>scope</key>
<string>object.property.function.prototype.js</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FF6600</string>
</dict>
</dict>
</array>
<key>uuid</key>
<string>4B7A9AA6-C472-4460-BA48-199E2624956B</string>
</dict>
</plist>

View file

@ -373,6 +373,19 @@
<string>#FFFFFF</string> <string>#FFFFFF</string>
</dict> </dict>
</dict> </dict>
<dict>
<key>name</key>
<string>User1</string>
<key>scope</key>
<string>collab.user1</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#FFF980</string>
<key>foreground</key>
<string>#323232</string>
</dict>
</dict>
</array> </array>
<key>uuid</key> <key>uuid</key>
<string>95BEF169-A2E5-4041-A84A-AAFC1DD61558</string> <string>95BEF169-A2E5-4041-A84A-AAFC1DD61558</string>