package
This commit is contained in:
parent
209887ad47
commit
c4bcb96b3a
8 changed files with 323 additions and 1267 deletions
|
|
@ -3296,7 +3296,7 @@ var Editor = function(renderer, session) {
|
|||
wrap: true
|
||||
});
|
||||
|
||||
this.commands = new CommandManager(defaultCommands);
|
||||
this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
|
||||
this.setSession(session || new EditSession(""));
|
||||
};
|
||||
|
||||
|
|
@ -5709,7 +5709,6 @@ var KeyBinding = function(editor) {
|
|||
};
|
||||
|
||||
this.$callKeyboardHandler = function (e, hashId, keyOrText, keyCode) {
|
||||
var env = {editor: this.$editor};
|
||||
var toExecute;
|
||||
var commands = this.$editor.commands;
|
||||
|
||||
|
|
@ -5723,7 +5722,7 @@ var KeyBinding = function(editor) {
|
|||
if (!toExecute || !toExecute.command) {
|
||||
if (hashId != 0 || keyCode != 0) {
|
||||
toExecute = {
|
||||
command: commands.findKeyCommand(env, hashId, keyOrText)
|
||||
command: commands.findKeyCommand(hashId, keyOrText)
|
||||
}
|
||||
} else {
|
||||
toExecute = {
|
||||
|
|
@ -5739,7 +5738,7 @@ var KeyBinding = function(editor) {
|
|||
if (toExecute && toExecute.command) {
|
||||
success = commands.exec(
|
||||
toExecute.command,
|
||||
env, toExecute.args
|
||||
this.$editor, toExecute.args
|
||||
);
|
||||
if (success) {
|
||||
event.stopEvent(e);
|
||||
|
|
@ -5811,286 +5810,285 @@ var lang = require("../lib/lang");
|
|||
function bindKey(win, mac) {
|
||||
return {
|
||||
win: win,
|
||||
mac: mac,
|
||||
sender: "editor"
|
||||
mac: mac
|
||||
};
|
||||
}
|
||||
|
||||
exports.commands = [{
|
||||
name: "selectall",
|
||||
bindKey: bindKey("Ctrl-A", "Command-A"),
|
||||
exec: function(env, args) { env.editor.selectAll(); }
|
||||
exec: function(editor) { editor.selectAll(); }
|
||||
}, {
|
||||
name: "removeline",
|
||||
bindKey: bindKey("Ctrl-D", "Command-D"),
|
||||
exec: function(env, args) { env.editor.removeLines(); }
|
||||
exec: function(editor) { editor.removeLines(); }
|
||||
}, {
|
||||
name: "gotoline",
|
||||
bindKey: bindKey("Ctrl-L", "Command-L"),
|
||||
exec: function(env, args) {
|
||||
exec: function(editor) {
|
||||
var line = parseInt(prompt("Enter line number:"));
|
||||
if (!isNaN(line)) {
|
||||
env.editor.gotoLine(line);
|
||||
editor.gotoLine(line);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
name: "togglecomment",
|
||||
bindKey: bindKey("Ctrl-7", "Command-7"),
|
||||
exec: function(env, args) { env.editor.toggleCommentLines(); }
|
||||
exec: function(editor) { editor.toggleCommentLines(); }
|
||||
}, {
|
||||
name: "findnext",
|
||||
bindKey: bindKey("Ctrl-K", "Command-G"),
|
||||
exec: function(env, args) { env.editor.findNext(); }
|
||||
exec: function(editor) { editor.findNext(); }
|
||||
}, {
|
||||
name: "findprevious",
|
||||
bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
|
||||
exec: function(env, args) { env.editor.findPrevious(); }
|
||||
exec: function(editor) { editor.findPrevious(); }
|
||||
}, {
|
||||
name: "find",
|
||||
bindKey: bindKey("Ctrl-F", "Command-F"),
|
||||
exec: function(env, args) {
|
||||
var needle = prompt("Find:", env.editor.getCopyText());
|
||||
env.editor.find(needle);
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:", editor.getCopyText());
|
||||
editor.find(needle);
|
||||
}
|
||||
}, {
|
||||
name: "replace",
|
||||
bindKey: bindKey("Ctrl-R", "Command-Option-F"),
|
||||
exec: function(env, args) {
|
||||
var needle = prompt("Find:", env.editor.getCopyText());
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:", editor.getCopyText());
|
||||
if (!needle)
|
||||
return;
|
||||
var replacement = prompt("Replacement:");
|
||||
if (!replacement)
|
||||
return;
|
||||
env.editor.replace(replacement, {needle: needle});
|
||||
editor.replace(replacement, {needle: needle});
|
||||
}
|
||||
}, {
|
||||
name: "replaceall",
|
||||
bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
|
||||
exec: function(env, args) {
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:");
|
||||
if (!needle)
|
||||
return;
|
||||
var replacement = prompt("Replacement:");
|
||||
if (!replacement)
|
||||
return;
|
||||
env.editor.replaceAll(replacement, {needle: needle});
|
||||
editor.replaceAll(replacement, {needle: needle});
|
||||
}
|
||||
}, {
|
||||
name: "undo",
|
||||
bindKey: bindKey("Ctrl-Z", "Command-Z"),
|
||||
exec: function(env, args) { env.editor.undo(); }
|
||||
exec: function(editor) { editor.undo(); }
|
||||
}, {
|
||||
name: "redo",
|
||||
bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
|
||||
exec: function(env, args) { env.editor.redo(); }
|
||||
exec: function(editor) { editor.redo(); }
|
||||
}, {
|
||||
name: "overwrite",
|
||||
bindKey: bindKey("Insert", "Insert"),
|
||||
exec: function(env, args) { env.editor.toggleOverwrite(); }
|
||||
exec: function(editor) { editor.toggleOverwrite(); }
|
||||
}, {
|
||||
name: "copylinesup",
|
||||
bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"),
|
||||
exec: function(env, args) { env.editor.copyLinesUp(); }
|
||||
exec: function(editor) { editor.copyLinesUp(); }
|
||||
}, {
|
||||
name: "movelinesup",
|
||||
bindKey: bindKey("Alt-Up", "Option-Up"),
|
||||
exec: function(env, args) { env.editor.moveLinesUp(); }
|
||||
exec: function(editor) { editor.moveLinesUp(); }
|
||||
}, {
|
||||
name: "selecttostart",
|
||||
bindKey: bindKey("Ctrl-Shift-Home|Alt-Shift-Up", "Command-Shift-Up"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectFileStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectFileStart(); }
|
||||
}, {
|
||||
name: "gotostart",
|
||||
bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"),
|
||||
exec: function(env, args) { env.editor.navigateFileStart(); }
|
||||
exec: function(editor) { editor.navigateFileStart(); }
|
||||
}, {
|
||||
name: "selectup",
|
||||
bindKey: bindKey("Shift-Up", "Shift-Up"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectUp(); }
|
||||
exec: function(editor) { editor.getSelection().selectUp(); }
|
||||
}, {
|
||||
name: "golineup",
|
||||
bindKey: bindKey("Up", "Up|Ctrl-P"),
|
||||
exec: function(env, args) { env.editor.navigateUp(args.times); }
|
||||
exec: function(editor, args) { editor.navigateUp(args.times); }
|
||||
}, {
|
||||
name: "copylinesdown",
|
||||
bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"),
|
||||
exec: function(env, args) { env.editor.copyLinesDown(); }
|
||||
exec: function(editor) { editor.copyLinesDown(); }
|
||||
}, {
|
||||
name: "movelinesdown",
|
||||
bindKey: bindKey("Alt-Down", "Option-Down"),
|
||||
exec: function(env, args) { env.editor.moveLinesDown(); }
|
||||
exec: function(editor) { editor.moveLinesDown(); }
|
||||
}, {
|
||||
name: "selecttoend",
|
||||
bindKey: bindKey("Ctrl-Shift-End|Alt-Shift-Down", "Command-Shift-Down"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectFileEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectFileEnd(); }
|
||||
}, {
|
||||
name: "gotoend",
|
||||
bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"),
|
||||
exec: function(env, args) { env.editor.navigateFileEnd(); }
|
||||
exec: function(editor) { editor.navigateFileEnd(); }
|
||||
}, {
|
||||
name: "selectdown",
|
||||
bindKey: bindKey("Shift-Down", "Shift-Down"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectDown(); }
|
||||
exec: function(editor) { editor.getSelection().selectDown(); }
|
||||
}, {
|
||||
name: "golinedown",
|
||||
bindKey: bindKey("Down", "Down|Ctrl-N"),
|
||||
exec: function(env, args) { env.editor.navigateDown(args.times); }
|
||||
exec: function(editor, args) { editor.navigateDown(args.times); }
|
||||
}, {
|
||||
name: "selectwordleft",
|
||||
bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectWordLeft(); }
|
||||
exec: function(editor) { editor.getSelection().selectWordLeft(); }
|
||||
}, {
|
||||
name: "gotowordleft",
|
||||
bindKey: bindKey("Ctrl-Left", "Option-Left"),
|
||||
exec: function(env, args) { env.editor.navigateWordLeft(); }
|
||||
exec: function(editor) { editor.navigateWordLeft(); }
|
||||
}, {
|
||||
name: "selecttolinestart",
|
||||
bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineStart(); }
|
||||
}, {
|
||||
name: "gotolinestart",
|
||||
bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
|
||||
exec: function(env, args) { env.editor.navigateLineStart(); }
|
||||
exec: function(editor) { editor.navigateLineStart(); }
|
||||
}, {
|
||||
name: "selectleft",
|
||||
bindKey: bindKey("Shift-Left", "Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLeft(); }
|
||||
exec: function(editor) { editor.getSelection().selectLeft(); }
|
||||
}, {
|
||||
name: "gotoleft",
|
||||
bindKey: bindKey("Left", "Left|Ctrl-B"),
|
||||
exec: function(env, args) { env.editor.navigateLeft(args.times); }
|
||||
exec: function(editor, args) { editor.navigateLeft(args.times); }
|
||||
}, {
|
||||
name: "selectwordright",
|
||||
bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectWordRight(); }
|
||||
exec: function(editor) { editor.getSelection().selectWordRight(); }
|
||||
}, {
|
||||
name: "gotowordright",
|
||||
bindKey: bindKey("Ctrl-Right", "Option-Right"),
|
||||
exec: function(env, args) { env.editor.navigateWordRight(); }
|
||||
exec: function(editor) { editor.navigateWordRight(); }
|
||||
}, {
|
||||
name: "selecttolineend",
|
||||
bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineEnd(); }
|
||||
}, {
|
||||
name: "gotolineend",
|
||||
bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
|
||||
exec: function(env, args) { env.editor.navigateLineEnd(); }
|
||||
exec: function(editor) { editor.navigateLineEnd(); }
|
||||
}, {
|
||||
name: "selectright",
|
||||
bindKey: bindKey("Shift-Right", "Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectRight(); }
|
||||
exec: function(editor) { editor.getSelection().selectRight(); }
|
||||
}, {
|
||||
name: "gotoright",
|
||||
bindKey: bindKey("Right", "Right|Ctrl-F"),
|
||||
exec: function(env, args) { env.editor.navigateRight(args.times); }
|
||||
exec: function(editor, args) { editor.navigateRight(args.times); }
|
||||
}, {
|
||||
name: "selectpagedown",
|
||||
bindKey: bindKey("Shift-PageDown", "Shift-PageDown"),
|
||||
exec: function(env, args) { env.editor.selectPageDown(); }
|
||||
exec: function(editor) { editor.selectPageDown(); }
|
||||
}, {
|
||||
name: "pagedown",
|
||||
bindKey: bindKey(null, "PageDown"),
|
||||
exec: function(env, args) { env.editor.scrollPageDown(); }
|
||||
exec: function(editor) { editor.scrollPageDown(); }
|
||||
}, {
|
||||
name: "gotopagedown",
|
||||
bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"),
|
||||
exec: function(env, args) { env.editor.gotoPageDown(); }
|
||||
exec: function(editor) { editor.gotoPageDown(); }
|
||||
}, {
|
||||
name: "selectpageup",
|
||||
bindKey: bindKey("Shift-PageUp", "Shift-PageUp"),
|
||||
exec: function(env, args) { env.editor.selectPageUp(); }
|
||||
exec: function(editor) { editor.selectPageUp(); }
|
||||
}, {
|
||||
name: "pageup",
|
||||
bindKey: bindKey(null, "PageUp"),
|
||||
exec: function(env, args) { env.editor.scrollPageUp(); }
|
||||
exec: function(editor) { editor.scrollPageUp(); }
|
||||
}, {
|
||||
name: "gotopageup",
|
||||
bindKey: bindKey("PageUp", "Option-PageUp"),
|
||||
exec: function(env, args) { env.editor.gotoPageUp(); }
|
||||
exec: function(editor) { editor.gotoPageUp(); }
|
||||
}, {
|
||||
name: "selectlinestart",
|
||||
bindKey: bindKey("Shift-Home", "Shift-Home"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineStart(); }
|
||||
}, {
|
||||
name: "selectlineend",
|
||||
bindKey: bindKey("Shift-End", "Shift-End"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineEnd(); }
|
||||
}, {
|
||||
name: "del",
|
||||
bindKey: bindKey("Delete", "Delete|Ctrl-D"),
|
||||
exec: function(env, args) { env.editor.remove("right"); }
|
||||
exec: function(editor) { editor.remove("right"); }
|
||||
}, {
|
||||
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) { env.editor.remove("left"); }
|
||||
exec: function(editor) { editor.remove("left"); }
|
||||
}, {
|
||||
name: "removetolinestart",
|
||||
bindKey: bindKey("Alt-Backspace", "Option-Backspace"),
|
||||
exec: function(env, args) { env.editor.removeToLineStart(); }
|
||||
exec: function(editor) { editor.removeToLineStart(); }
|
||||
}, {
|
||||
name: "removetolineend",
|
||||
bindKey: bindKey("Alt-Delete", "Ctrl-K"),
|
||||
exec: function(env, args) { env.editor.removeToLineEnd(); }
|
||||
exec: function(editor) { editor.removeToLineEnd(); }
|
||||
}, {
|
||||
name: "removewordleft",
|
||||
bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
|
||||
exec: function(env, args) { env.editor.removeWordLeft(); }
|
||||
exec: function(editor) { editor.removeWordLeft(); }
|
||||
}, {
|
||||
name: "removewordright",
|
||||
bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
|
||||
exec: function(env, args) { env.editor.removeWordRight(); }
|
||||
exec: function(editor) { editor.removeWordRight(); }
|
||||
}, {
|
||||
name: "outdent",
|
||||
bindKey: bindKey("Shift-Tab", "Shift-Tab"),
|
||||
exec: function(env, args) { env.editor.blockOutdent(); }
|
||||
exec: function(editor) { editor.blockOutdent(); }
|
||||
}, {
|
||||
name: "indent",
|
||||
bindKey: bindKey("Tab", "Tab"),
|
||||
exec: function(env, args) { env.editor.indent(); }
|
||||
exec: function(editor) { editor.indent(); }
|
||||
}, {
|
||||
name: "inserttext",
|
||||
exec: function(env, args) {
|
||||
env.editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
|
||||
exec: function(editor, args) {
|
||||
editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
|
||||
}
|
||||
}, {
|
||||
name: "centerselection",
|
||||
bindKey: bindKey(null, "Ctrl-L"),
|
||||
exec: function(env, args) { env.editor.centerSelection(); }
|
||||
exec: function(editor) { editor.centerSelection(); }
|
||||
}, {
|
||||
name: "splitline",
|
||||
bindKey: bindKey(null, "Ctrl-O"),
|
||||
exec: function(env, args) { env.editor.splitLine(); }
|
||||
exec: function(editor) { editor.splitLine(); }
|
||||
}, {
|
||||
name: "transposeletters",
|
||||
bindKey: bindKey("Ctrl-T", "Ctrl-T"),
|
||||
exec: function(env, args) { env.editor.transposeLetters(); }
|
||||
exec: function(editor) { editor.transposeLetters(); }
|
||||
}, {
|
||||
name: "fold",
|
||||
bindKey: bindKey("Alt-L", "Alt-L"),
|
||||
exec: function(env) {
|
||||
env.editor.session.toggleFold(false);
|
||||
exec: function(editor) {
|
||||
editor.session.toggleFold(false);
|
||||
}
|
||||
}, {
|
||||
name: "unfold",
|
||||
bindKey: bindKey("Alt-Shift-L", "Alt-Shift-L"),
|
||||
exec: function(env) {
|
||||
env.editor.session.toggleFold(true);
|
||||
exec: function(editor) {
|
||||
editor.session.toggleFold(true);
|
||||
}
|
||||
}, {
|
||||
name: "foldall",
|
||||
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
|
||||
exec: function(env) {
|
||||
env.editor.session.foldAll();
|
||||
exec: function(editor) {
|
||||
editor.session.foldAll();
|
||||
}
|
||||
}, {
|
||||
name: "unfoldall",
|
||||
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
|
||||
exec: function(env) {
|
||||
env.editor.session.unFoldAll();
|
||||
exec: function(editor) {
|
||||
editor.session.unFoldAll();
|
||||
}
|
||||
}];
|
||||
|
||||
|
|
@ -11049,12 +11047,15 @@ Search.SELECTION = 2;
|
|||
|
||||
exports.Search = Search;
|
||||
});
|
||||
define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent'], function(require, exports, module) {
|
||||
define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
|
||||
|
||||
var keyUtil = require("../lib/keys");
|
||||
var useragent = require("../lib/useragent");
|
||||
|
||||
var CommandManager = function(commands) {
|
||||
var CommandManager = function(platform, commands) {
|
||||
if (typeof platform !== "string")
|
||||
throw new TypeError("'platform' argument must be either 'mac' or 'win'");
|
||||
|
||||
this.platform = platform;
|
||||
this.commands = {};
|
||||
this.commmandKeyBinding = {};
|
||||
|
||||
|
|
@ -11065,6 +11066,9 @@ var CommandManager = function(commands) {
|
|||
(function() {
|
||||
|
||||
this.addCommand = function(command) {
|
||||
if (this.commands[command.name])
|
||||
this.removeCommand(command);
|
||||
|
||||
this.commands[command.name] = command;
|
||||
|
||||
if (command.bindKey) {
|
||||
|
|
@ -11072,12 +11076,12 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
};
|
||||
|
||||
function removeCommand(command) {
|
||||
this.removeCommand = function(command) {
|
||||
var name = (typeof command === 'string' ? command : command.name);
|
||||
command = this.commands[name];
|
||||
delete commands[name];
|
||||
delete this.commands[name];
|
||||
|
||||
// exaustive search is a little bit brute force but since removeCommand is
|
||||
// exaustive search is brute force but since removeCommand is
|
||||
// not a performance critical operation this should be OK
|
||||
var ckb = this.commmandKeyBinding;
|
||||
for (var hashId in ckb) {
|
||||
|
|
@ -11088,15 +11092,13 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
};
|
||||
|
||||
var platform = useragent.isMac ? "mac" : "win";
|
||||
|
||||
this._buildKeyHash = function(command) {
|
||||
var binding = command.bindKey;
|
||||
var key = binding[platform];
|
||||
var key = binding[this.platform];
|
||||
var ckb = this.commmandKeyBinding;
|
||||
|
||||
if(!binding[platform]) {
|
||||
return;
|
||||
if(!binding[this.platform]) {
|
||||
return;
|
||||
}
|
||||
|
||||
key.split("|").forEach(function(keyPart) {
|
||||
|
|
@ -11109,7 +11111,7 @@ var CommandManager = function(commands) {
|
|||
function parseKeys(keys, val, ret) {
|
||||
var key;
|
||||
var hashId = 0;
|
||||
var parts = splitSafe(keys, "\\-", null, true);
|
||||
var parts = splitSafe(keys);
|
||||
|
||||
for (var i=0, l = parts.length; i < l; i++) {
|
||||
if (keyUtil.KEY_MODS[parts[i]])
|
||||
|
|
@ -11124,27 +11126,31 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
}
|
||||
|
||||
function splitSafe(s, separator, limit, bLowerCase) {
|
||||
return (bLowerCase && s.toLowerCase() || s)
|
||||
.replace(/(?:^\s+|\n|\s+$)/g, "")
|
||||
.split(new RegExp("[\\s ]*" + separator + "[\\s ]*", "g"), limit || 999);
|
||||
function splitSafe(s, separator) {
|
||||
return (s.toLowerCase()
|
||||
.trim()
|
||||
.split(new RegExp("[\\s ]*\\-[\\s ]*", "g"), 999));
|
||||
}
|
||||
|
||||
this.findKeyCommand = function findKeyCommand(env, hashId, textOrKey) {
|
||||
this.findKeyCommand = function findKeyCommand(hashId, textOrKey) {
|
||||
// Convert keyCode to the string representation.
|
||||
if (typeof textOrKey == "number") {
|
||||
textOrKey = keyUtil.keyCodeToString(textOrKey);
|
||||
}
|
||||
|
||||
|
||||
var ckbr = this.commmandKeyBinding;
|
||||
return ckbr[hashId] && ckbr[hashId][textOrKey];
|
||||
return ckbr[hashId] && ckbr[hashId][textOrKey.toLowerCase()];
|
||||
}
|
||||
|
||||
this.exec = function(command, env, args) {
|
||||
this.exec = function(command, editor, args) {
|
||||
if (typeof command === 'string')
|
||||
command = this.commands[command];
|
||||
|
||||
command.exec(env, args || {});
|
||||
if (!command)
|
||||
return false;
|
||||
|
||||
command.exec(editor, args || {});
|
||||
return true;
|
||||
};
|
||||
|
||||
}).call(CommandManager.prototype);
|
||||
|
|
@ -11212,12 +11218,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
// Imports CSS once per DOM document ('ace_editor' serves as an identifier).
|
||||
dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
|
||||
dom.addCssClass(this.container, "ace_editor");
|
||||
|
||||
// Chrome has some strange rendering issues if this is not done async
|
||||
setTimeout(function() {
|
||||
dom.addCssClass(this.container, "ace_editor");
|
||||
}.bind(this), 0)
|
||||
dom.addCssClass(container, "ace_editor");
|
||||
}, 0)
|
||||
|
||||
this.setTheme(theme);
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
Ace
|
||||
version 0.2.0
|
||||
commit 09861873002375a05d7ce6099ddc68ac3c90896f
|
||||
commit e910138acddb2226501de83a093297b1b619d8d4
|
||||
|
||||
|
||||
-->
|
||||
|
|
|
|||
1
build/src/ace-compat.js
Normal file
1
build/src/ace-compat.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
define(function(a,b,c){a("pilot/browser_focus"),a("pilot/dom"),a("pilot/event"),a("pilot/event_emitter"),a("pilot/fixoldbrowsers"),a("pilot/keys"),a("pilot/lang"),a("pilot/oop"),a("pilot/useragent"),a("pilot/canon")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/browser_focus' is deprecated. Use 'ace/lib/browser_focus' instead"),c.exports=a("ace/lib/browser_focus")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/dom' is deprecated. Use 'ace/lib/dom' instead"),c.exports=a("ace/lib/dom")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/event' is deprecated. Use 'ace/lib/event' instead"),c.exports=a("ace/lib/event")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/event_emitter' is deprecated. Use 'ace/lib/event_emitter' instead"),c.exports=a("ace/lib/event_emitter")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/fixoldbrowsers' is deprecated. Use 'ace/lib/fixoldbrowsers' instead"),c.exports=a("ace/lib/fixoldbrowsers")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/keys' is deprecated. Use 'ace/lib/keys' instead"),c.exports=a("ace/lib/keys")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/lang' is deprecated. Use 'ace/lib/lang' instead"),c.exports=a("ace/lib/lang")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/oop' is deprecated. Use 'ace/lib/oop' instead"),c.exports=a("ace/lib/oop")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/useragent' is deprecated. Use 'ace/lib/useragent' instead"),c.exports=a("ace/lib/useragent")}),define(function(a,b,c){console.warn("DEPRECATED: 'pilot/canon' is deprecated."),b.addCommand=function(){console.warn("DEPRECATED: 'canon.addCommand()' is deprecated. Use 'editor.commands.addCommand(command)' instead."),console.trace()},b.removeCommand=function(){console.warn("DEPRECATED: 'canon.removeCommand()' is deprecated. Use 'editor.commands.removeCommand(command)' instead."),console.trace()}})
|
||||
|
|
@ -2441,7 +2441,7 @@ var Editor = function(renderer, session) {
|
|||
wrap: true
|
||||
});
|
||||
|
||||
this.commands = new CommandManager(defaultCommands);
|
||||
this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
|
||||
this.setSession(session || new EditSession(""));
|
||||
};
|
||||
|
||||
|
|
@ -4854,7 +4854,6 @@ var KeyBinding = function(editor) {
|
|||
};
|
||||
|
||||
this.$callKeyboardHandler = function (e, hashId, keyOrText, keyCode) {
|
||||
var env = {editor: this.$editor};
|
||||
var toExecute;
|
||||
var commands = this.$editor.commands;
|
||||
|
||||
|
|
@ -4868,7 +4867,7 @@ var KeyBinding = function(editor) {
|
|||
if (!toExecute || !toExecute.command) {
|
||||
if (hashId != 0 || keyCode != 0) {
|
||||
toExecute = {
|
||||
command: commands.findKeyCommand(env, hashId, keyOrText)
|
||||
command: commands.findKeyCommand(hashId, keyOrText)
|
||||
}
|
||||
} else {
|
||||
toExecute = {
|
||||
|
|
@ -4884,7 +4883,7 @@ var KeyBinding = function(editor) {
|
|||
if (toExecute && toExecute.command) {
|
||||
success = commands.exec(
|
||||
toExecute.command,
|
||||
env, toExecute.args
|
||||
this.$editor, toExecute.args
|
||||
);
|
||||
if (success) {
|
||||
event.stopEvent(e);
|
||||
|
|
@ -4956,286 +4955,285 @@ var lang = require("../lib/lang");
|
|||
function bindKey(win, mac) {
|
||||
return {
|
||||
win: win,
|
||||
mac: mac,
|
||||
sender: "editor"
|
||||
mac: mac
|
||||
};
|
||||
}
|
||||
|
||||
exports.commands = [{
|
||||
name: "selectall",
|
||||
bindKey: bindKey("Ctrl-A", "Command-A"),
|
||||
exec: function(env, args) { env.editor.selectAll(); }
|
||||
exec: function(editor) { editor.selectAll(); }
|
||||
}, {
|
||||
name: "removeline",
|
||||
bindKey: bindKey("Ctrl-D", "Command-D"),
|
||||
exec: function(env, args) { env.editor.removeLines(); }
|
||||
exec: function(editor) { editor.removeLines(); }
|
||||
}, {
|
||||
name: "gotoline",
|
||||
bindKey: bindKey("Ctrl-L", "Command-L"),
|
||||
exec: function(env, args) {
|
||||
exec: function(editor) {
|
||||
var line = parseInt(prompt("Enter line number:"));
|
||||
if (!isNaN(line)) {
|
||||
env.editor.gotoLine(line);
|
||||
editor.gotoLine(line);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
name: "togglecomment",
|
||||
bindKey: bindKey("Ctrl-7", "Command-7"),
|
||||
exec: function(env, args) { env.editor.toggleCommentLines(); }
|
||||
exec: function(editor) { editor.toggleCommentLines(); }
|
||||
}, {
|
||||
name: "findnext",
|
||||
bindKey: bindKey("Ctrl-K", "Command-G"),
|
||||
exec: function(env, args) { env.editor.findNext(); }
|
||||
exec: function(editor) { editor.findNext(); }
|
||||
}, {
|
||||
name: "findprevious",
|
||||
bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
|
||||
exec: function(env, args) { env.editor.findPrevious(); }
|
||||
exec: function(editor) { editor.findPrevious(); }
|
||||
}, {
|
||||
name: "find",
|
||||
bindKey: bindKey("Ctrl-F", "Command-F"),
|
||||
exec: function(env, args) {
|
||||
var needle = prompt("Find:", env.editor.getCopyText());
|
||||
env.editor.find(needle);
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:", editor.getCopyText());
|
||||
editor.find(needle);
|
||||
}
|
||||
}, {
|
||||
name: "replace",
|
||||
bindKey: bindKey("Ctrl-R", "Command-Option-F"),
|
||||
exec: function(env, args) {
|
||||
var needle = prompt("Find:", env.editor.getCopyText());
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:", editor.getCopyText());
|
||||
if (!needle)
|
||||
return;
|
||||
var replacement = prompt("Replacement:");
|
||||
if (!replacement)
|
||||
return;
|
||||
env.editor.replace(replacement, {needle: needle});
|
||||
editor.replace(replacement, {needle: needle});
|
||||
}
|
||||
}, {
|
||||
name: "replaceall",
|
||||
bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
|
||||
exec: function(env, args) {
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:");
|
||||
if (!needle)
|
||||
return;
|
||||
var replacement = prompt("Replacement:");
|
||||
if (!replacement)
|
||||
return;
|
||||
env.editor.replaceAll(replacement, {needle: needle});
|
||||
editor.replaceAll(replacement, {needle: needle});
|
||||
}
|
||||
}, {
|
||||
name: "undo",
|
||||
bindKey: bindKey("Ctrl-Z", "Command-Z"),
|
||||
exec: function(env, args) { env.editor.undo(); }
|
||||
exec: function(editor) { editor.undo(); }
|
||||
}, {
|
||||
name: "redo",
|
||||
bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
|
||||
exec: function(env, args) { env.editor.redo(); }
|
||||
exec: function(editor) { editor.redo(); }
|
||||
}, {
|
||||
name: "overwrite",
|
||||
bindKey: bindKey("Insert", "Insert"),
|
||||
exec: function(env, args) { env.editor.toggleOverwrite(); }
|
||||
exec: function(editor) { editor.toggleOverwrite(); }
|
||||
}, {
|
||||
name: "copylinesup",
|
||||
bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"),
|
||||
exec: function(env, args) { env.editor.copyLinesUp(); }
|
||||
exec: function(editor) { editor.copyLinesUp(); }
|
||||
}, {
|
||||
name: "movelinesup",
|
||||
bindKey: bindKey("Alt-Up", "Option-Up"),
|
||||
exec: function(env, args) { env.editor.moveLinesUp(); }
|
||||
exec: function(editor) { editor.moveLinesUp(); }
|
||||
}, {
|
||||
name: "selecttostart",
|
||||
bindKey: bindKey("Ctrl-Shift-Home|Alt-Shift-Up", "Command-Shift-Up"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectFileStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectFileStart(); }
|
||||
}, {
|
||||
name: "gotostart",
|
||||
bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"),
|
||||
exec: function(env, args) { env.editor.navigateFileStart(); }
|
||||
exec: function(editor) { editor.navigateFileStart(); }
|
||||
}, {
|
||||
name: "selectup",
|
||||
bindKey: bindKey("Shift-Up", "Shift-Up"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectUp(); }
|
||||
exec: function(editor) { editor.getSelection().selectUp(); }
|
||||
}, {
|
||||
name: "golineup",
|
||||
bindKey: bindKey("Up", "Up|Ctrl-P"),
|
||||
exec: function(env, args) { env.editor.navigateUp(args.times); }
|
||||
exec: function(editor, args) { editor.navigateUp(args.times); }
|
||||
}, {
|
||||
name: "copylinesdown",
|
||||
bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"),
|
||||
exec: function(env, args) { env.editor.copyLinesDown(); }
|
||||
exec: function(editor) { editor.copyLinesDown(); }
|
||||
}, {
|
||||
name: "movelinesdown",
|
||||
bindKey: bindKey("Alt-Down", "Option-Down"),
|
||||
exec: function(env, args) { env.editor.moveLinesDown(); }
|
||||
exec: function(editor) { editor.moveLinesDown(); }
|
||||
}, {
|
||||
name: "selecttoend",
|
||||
bindKey: bindKey("Ctrl-Shift-End|Alt-Shift-Down", "Command-Shift-Down"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectFileEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectFileEnd(); }
|
||||
}, {
|
||||
name: "gotoend",
|
||||
bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"),
|
||||
exec: function(env, args) { env.editor.navigateFileEnd(); }
|
||||
exec: function(editor) { editor.navigateFileEnd(); }
|
||||
}, {
|
||||
name: "selectdown",
|
||||
bindKey: bindKey("Shift-Down", "Shift-Down"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectDown(); }
|
||||
exec: function(editor) { editor.getSelection().selectDown(); }
|
||||
}, {
|
||||
name: "golinedown",
|
||||
bindKey: bindKey("Down", "Down|Ctrl-N"),
|
||||
exec: function(env, args) { env.editor.navigateDown(args.times); }
|
||||
exec: function(editor, args) { editor.navigateDown(args.times); }
|
||||
}, {
|
||||
name: "selectwordleft",
|
||||
bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectWordLeft(); }
|
||||
exec: function(editor) { editor.getSelection().selectWordLeft(); }
|
||||
}, {
|
||||
name: "gotowordleft",
|
||||
bindKey: bindKey("Ctrl-Left", "Option-Left"),
|
||||
exec: function(env, args) { env.editor.navigateWordLeft(); }
|
||||
exec: function(editor) { editor.navigateWordLeft(); }
|
||||
}, {
|
||||
name: "selecttolinestart",
|
||||
bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineStart(); }
|
||||
}, {
|
||||
name: "gotolinestart",
|
||||
bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
|
||||
exec: function(env, args) { env.editor.navigateLineStart(); }
|
||||
exec: function(editor) { editor.navigateLineStart(); }
|
||||
}, {
|
||||
name: "selectleft",
|
||||
bindKey: bindKey("Shift-Left", "Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLeft(); }
|
||||
exec: function(editor) { editor.getSelection().selectLeft(); }
|
||||
}, {
|
||||
name: "gotoleft",
|
||||
bindKey: bindKey("Left", "Left|Ctrl-B"),
|
||||
exec: function(env, args) { env.editor.navigateLeft(args.times); }
|
||||
exec: function(editor, args) { editor.navigateLeft(args.times); }
|
||||
}, {
|
||||
name: "selectwordright",
|
||||
bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectWordRight(); }
|
||||
exec: function(editor) { editor.getSelection().selectWordRight(); }
|
||||
}, {
|
||||
name: "gotowordright",
|
||||
bindKey: bindKey("Ctrl-Right", "Option-Right"),
|
||||
exec: function(env, args) { env.editor.navigateWordRight(); }
|
||||
exec: function(editor) { editor.navigateWordRight(); }
|
||||
}, {
|
||||
name: "selecttolineend",
|
||||
bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineEnd(); }
|
||||
}, {
|
||||
name: "gotolineend",
|
||||
bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
|
||||
exec: function(env, args) { env.editor.navigateLineEnd(); }
|
||||
exec: function(editor) { editor.navigateLineEnd(); }
|
||||
}, {
|
||||
name: "selectright",
|
||||
bindKey: bindKey("Shift-Right", "Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectRight(); }
|
||||
exec: function(editor) { editor.getSelection().selectRight(); }
|
||||
}, {
|
||||
name: "gotoright",
|
||||
bindKey: bindKey("Right", "Right|Ctrl-F"),
|
||||
exec: function(env, args) { env.editor.navigateRight(args.times); }
|
||||
exec: function(editor, args) { editor.navigateRight(args.times); }
|
||||
}, {
|
||||
name: "selectpagedown",
|
||||
bindKey: bindKey("Shift-PageDown", "Shift-PageDown"),
|
||||
exec: function(env, args) { env.editor.selectPageDown(); }
|
||||
exec: function(editor) { editor.selectPageDown(); }
|
||||
}, {
|
||||
name: "pagedown",
|
||||
bindKey: bindKey(null, "PageDown"),
|
||||
exec: function(env, args) { env.editor.scrollPageDown(); }
|
||||
exec: function(editor) { editor.scrollPageDown(); }
|
||||
}, {
|
||||
name: "gotopagedown",
|
||||
bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"),
|
||||
exec: function(env, args) { env.editor.gotoPageDown(); }
|
||||
exec: function(editor) { editor.gotoPageDown(); }
|
||||
}, {
|
||||
name: "selectpageup",
|
||||
bindKey: bindKey("Shift-PageUp", "Shift-PageUp"),
|
||||
exec: function(env, args) { env.editor.selectPageUp(); }
|
||||
exec: function(editor) { editor.selectPageUp(); }
|
||||
}, {
|
||||
name: "pageup",
|
||||
bindKey: bindKey(null, "PageUp"),
|
||||
exec: function(env, args) { env.editor.scrollPageUp(); }
|
||||
exec: function(editor) { editor.scrollPageUp(); }
|
||||
}, {
|
||||
name: "gotopageup",
|
||||
bindKey: bindKey("PageUp", "Option-PageUp"),
|
||||
exec: function(env, args) { env.editor.gotoPageUp(); }
|
||||
exec: function(editor) { editor.gotoPageUp(); }
|
||||
}, {
|
||||
name: "selectlinestart",
|
||||
bindKey: bindKey("Shift-Home", "Shift-Home"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineStart(); }
|
||||
}, {
|
||||
name: "selectlineend",
|
||||
bindKey: bindKey("Shift-End", "Shift-End"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineEnd(); }
|
||||
}, {
|
||||
name: "del",
|
||||
bindKey: bindKey("Delete", "Delete|Ctrl-D"),
|
||||
exec: function(env, args) { env.editor.remove("right"); }
|
||||
exec: function(editor) { editor.remove("right"); }
|
||||
}, {
|
||||
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) { env.editor.remove("left"); }
|
||||
exec: function(editor) { editor.remove("left"); }
|
||||
}, {
|
||||
name: "removetolinestart",
|
||||
bindKey: bindKey("Alt-Backspace", "Option-Backspace"),
|
||||
exec: function(env, args) { env.editor.removeToLineStart(); }
|
||||
exec: function(editor) { editor.removeToLineStart(); }
|
||||
}, {
|
||||
name: "removetolineend",
|
||||
bindKey: bindKey("Alt-Delete", "Ctrl-K"),
|
||||
exec: function(env, args) { env.editor.removeToLineEnd(); }
|
||||
exec: function(editor) { editor.removeToLineEnd(); }
|
||||
}, {
|
||||
name: "removewordleft",
|
||||
bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
|
||||
exec: function(env, args) { env.editor.removeWordLeft(); }
|
||||
exec: function(editor) { editor.removeWordLeft(); }
|
||||
}, {
|
||||
name: "removewordright",
|
||||
bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
|
||||
exec: function(env, args) { env.editor.removeWordRight(); }
|
||||
exec: function(editor) { editor.removeWordRight(); }
|
||||
}, {
|
||||
name: "outdent",
|
||||
bindKey: bindKey("Shift-Tab", "Shift-Tab"),
|
||||
exec: function(env, args) { env.editor.blockOutdent(); }
|
||||
exec: function(editor) { editor.blockOutdent(); }
|
||||
}, {
|
||||
name: "indent",
|
||||
bindKey: bindKey("Tab", "Tab"),
|
||||
exec: function(env, args) { env.editor.indent(); }
|
||||
exec: function(editor) { editor.indent(); }
|
||||
}, {
|
||||
name: "inserttext",
|
||||
exec: function(env, args) {
|
||||
env.editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
|
||||
exec: function(editor, args) {
|
||||
editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
|
||||
}
|
||||
}, {
|
||||
name: "centerselection",
|
||||
bindKey: bindKey(null, "Ctrl-L"),
|
||||
exec: function(env, args) { env.editor.centerSelection(); }
|
||||
exec: function(editor) { editor.centerSelection(); }
|
||||
}, {
|
||||
name: "splitline",
|
||||
bindKey: bindKey(null, "Ctrl-O"),
|
||||
exec: function(env, args) { env.editor.splitLine(); }
|
||||
exec: function(editor) { editor.splitLine(); }
|
||||
}, {
|
||||
name: "transposeletters",
|
||||
bindKey: bindKey("Ctrl-T", "Ctrl-T"),
|
||||
exec: function(env, args) { env.editor.transposeLetters(); }
|
||||
exec: function(editor) { editor.transposeLetters(); }
|
||||
}, {
|
||||
name: "fold",
|
||||
bindKey: bindKey("Alt-L", "Alt-L"),
|
||||
exec: function(env) {
|
||||
env.editor.session.toggleFold(false);
|
||||
exec: function(editor) {
|
||||
editor.session.toggleFold(false);
|
||||
}
|
||||
}, {
|
||||
name: "unfold",
|
||||
bindKey: bindKey("Alt-Shift-L", "Alt-Shift-L"),
|
||||
exec: function(env) {
|
||||
env.editor.session.toggleFold(true);
|
||||
exec: function(editor) {
|
||||
editor.session.toggleFold(true);
|
||||
}
|
||||
}, {
|
||||
name: "foldall",
|
||||
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
|
||||
exec: function(env) {
|
||||
env.editor.session.foldAll();
|
||||
exec: function(editor) {
|
||||
editor.session.foldAll();
|
||||
}
|
||||
}, {
|
||||
name: "unfoldall",
|
||||
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
|
||||
exec: function(env) {
|
||||
env.editor.session.unFoldAll();
|
||||
exec: function(editor) {
|
||||
editor.session.unFoldAll();
|
||||
}
|
||||
}];
|
||||
|
||||
|
|
@ -10505,12 +10503,15 @@ Search.SELECTION = 2;
|
|||
|
||||
exports.Search = Search;
|
||||
});
|
||||
define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent'], function(require, exports, module) {
|
||||
define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
|
||||
|
||||
var keyUtil = require("../lib/keys");
|
||||
var useragent = require("../lib/useragent");
|
||||
|
||||
var CommandManager = function(commands) {
|
||||
var CommandManager = function(platform, commands) {
|
||||
if (typeof platform !== "string")
|
||||
throw new TypeError("'platform' argument must be either 'mac' or 'win'");
|
||||
|
||||
this.platform = platform;
|
||||
this.commands = {};
|
||||
this.commmandKeyBinding = {};
|
||||
|
||||
|
|
@ -10521,6 +10522,9 @@ var CommandManager = function(commands) {
|
|||
(function() {
|
||||
|
||||
this.addCommand = function(command) {
|
||||
if (this.commands[command.name])
|
||||
this.removeCommand(command);
|
||||
|
||||
this.commands[command.name] = command;
|
||||
|
||||
if (command.bindKey) {
|
||||
|
|
@ -10528,12 +10532,12 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
};
|
||||
|
||||
function removeCommand(command) {
|
||||
this.removeCommand = function(command) {
|
||||
var name = (typeof command === 'string' ? command : command.name);
|
||||
command = this.commands[name];
|
||||
delete commands[name];
|
||||
delete this.commands[name];
|
||||
|
||||
// exaustive search is a little bit brute force but since removeCommand is
|
||||
// exaustive search is brute force but since removeCommand is
|
||||
// not a performance critical operation this should be OK
|
||||
var ckb = this.commmandKeyBinding;
|
||||
for (var hashId in ckb) {
|
||||
|
|
@ -10544,15 +10548,13 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
};
|
||||
|
||||
var platform = useragent.isMac ? "mac" : "win";
|
||||
|
||||
this._buildKeyHash = function(command) {
|
||||
var binding = command.bindKey;
|
||||
var key = binding[platform];
|
||||
var key = binding[this.platform];
|
||||
var ckb = this.commmandKeyBinding;
|
||||
|
||||
if(!binding[platform]) {
|
||||
return;
|
||||
if(!binding[this.platform]) {
|
||||
return;
|
||||
}
|
||||
|
||||
key.split("|").forEach(function(keyPart) {
|
||||
|
|
@ -10565,7 +10567,7 @@ var CommandManager = function(commands) {
|
|||
function parseKeys(keys, val, ret) {
|
||||
var key;
|
||||
var hashId = 0;
|
||||
var parts = splitSafe(keys, "\\-", null, true);
|
||||
var parts = splitSafe(keys);
|
||||
|
||||
for (var i=0, l = parts.length; i < l; i++) {
|
||||
if (keyUtil.KEY_MODS[parts[i]])
|
||||
|
|
@ -10580,27 +10582,31 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
}
|
||||
|
||||
function splitSafe(s, separator, limit, bLowerCase) {
|
||||
return (bLowerCase && s.toLowerCase() || s)
|
||||
.replace(/(?:^\s+|\n|\s+$)/g, "")
|
||||
.split(new RegExp("[\\s ]*" + separator + "[\\s ]*", "g"), limit || 999);
|
||||
function splitSafe(s, separator) {
|
||||
return (s.toLowerCase()
|
||||
.trim()
|
||||
.split(new RegExp("[\\s ]*\\-[\\s ]*", "g"), 999));
|
||||
}
|
||||
|
||||
this.findKeyCommand = function findKeyCommand(env, hashId, textOrKey) {
|
||||
this.findKeyCommand = function findKeyCommand(hashId, textOrKey) {
|
||||
// Convert keyCode to the string representation.
|
||||
if (typeof textOrKey == "number") {
|
||||
textOrKey = keyUtil.keyCodeToString(textOrKey);
|
||||
}
|
||||
|
||||
|
||||
var ckbr = this.commmandKeyBinding;
|
||||
return ckbr[hashId] && ckbr[hashId][textOrKey];
|
||||
return ckbr[hashId] && ckbr[hashId][textOrKey.toLowerCase()];
|
||||
}
|
||||
|
||||
this.exec = function(command, env, args) {
|
||||
this.exec = function(command, editor, args) {
|
||||
if (typeof command === 'string')
|
||||
command = this.commands[command];
|
||||
|
||||
command.exec(env, args || {});
|
||||
if (!command)
|
||||
return false;
|
||||
|
||||
command.exec(editor, args || {});
|
||||
return true;
|
||||
};
|
||||
|
||||
}).call(CommandManager.prototype);
|
||||
|
|
@ -10761,12 +10767,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
// Imports CSS once per DOM document ('ace_editor' serves as an identifier).
|
||||
dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
|
||||
dom.addCssClass(this.container, "ace_editor");
|
||||
|
||||
// Chrome has some strange rendering issues if this is not done async
|
||||
setTimeout(function() {
|
||||
dom.addCssClass(this.container, "ace_editor");
|
||||
}.bind(this), 0)
|
||||
dom.addCssClass(container, "ace_editor");
|
||||
}, 0)
|
||||
|
||||
this.setTheme(theme);
|
||||
|
||||
|
|
@ -13204,486 +13209,6 @@ exports.cssText = ".ace-tm .ace_editor {\
|
|||
color: rgb(255, 0, 0)\
|
||||
}";
|
||||
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/index', ['require', 'exports', 'module' , 'pilot/browser_focus', 'pilot/dom', 'pilot/event', 'pilot/event_emitter', 'pilot/fixoldbrowsers', 'pilot/keys', 'pilot/lang', 'pilot/oop', 'pilot/useragent', 'pilot/canon'], function(require, exports, module) {
|
||||
require("pilot/browser_focus");
|
||||
require("pilot/dom");
|
||||
require("pilot/event");
|
||||
require("pilot/event_emitter");
|
||||
require("pilot/fixoldbrowsers");
|
||||
require("pilot/keys");
|
||||
require("pilot/lang");
|
||||
require("pilot/oop");
|
||||
require("pilot/useragent");
|
||||
require("pilot/canon");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/browser_focus', ['require', 'exports', 'module' , 'ace/lib/browser_focus'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/browser_focus' is deprecated. Use 'ace/lib/browser_focus' instead");
|
||||
module.exports = require("ace/lib/browser_focus");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/dom', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/dom' is deprecated. Use 'ace/lib/dom' instead");
|
||||
module.exports = require("ace/lib/dom");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/event', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/event' is deprecated. Use 'ace/lib/event' instead");
|
||||
module.exports = require("ace/lib/event");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/event_emitter', ['require', 'exports', 'module' , 'ace/lib/event_emitter'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/event_emitter' is deprecated. Use 'ace/lib/event_emitter' instead");
|
||||
module.exports = require("ace/lib/event_emitter");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/fixoldbrowsers' is deprecated. Use 'ace/lib/fixoldbrowsers' instead");
|
||||
module.exports = require("ace/lib/fixoldbrowsers");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/keys', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/keys' is deprecated. Use 'ace/lib/keys' instead");
|
||||
module.exports = require("ace/lib/keys");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/lang', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/lang' is deprecated. Use 'ace/lib/lang' instead");
|
||||
module.exports = require("ace/lib/lang");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/oop', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/oop' is deprecated. Use 'ace/lib/oop' instead");
|
||||
module.exports = require("ace/lib/oop");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/useragent', ['require', 'exports', 'module' , 'ace/lib/useragent'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/useragent' is deprecated. Use 'ace/lib/useragent' instead");
|
||||
module.exports = require("ace/lib/useragent");
|
||||
});
|
||||
/* 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
|
||||
* 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('pilot/canon', ['require', 'exports', 'module' ], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/canon' is deprecated.");
|
||||
//return require("ace/lib/dom");
|
||||
|
||||
exports.addCommand = function() {
|
||||
console.warn("DEPRECATED: 'canon.addCommand()' is deprecated. Use 'editor.commands.addCommand(command)' instead.");
|
||||
console.trace();
|
||||
}
|
||||
|
||||
exports.removeCommand = function() {
|
||||
console.warn("DEPRECATED: 'canon.removeCommand()' is deprecated. Use 'editor.commands.removeCommand(command)' instead.");
|
||||
console.trace();
|
||||
}
|
||||
});
|
||||
define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);\n" +
|
||||
"\n" +
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -2403,7 +2403,7 @@ var Editor = function(renderer, session) {
|
|||
wrap: true
|
||||
});
|
||||
|
||||
this.commands = new CommandManager(defaultCommands);
|
||||
this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
|
||||
this.setSession(session || new EditSession(""));
|
||||
};
|
||||
|
||||
|
|
@ -4816,7 +4816,6 @@ var KeyBinding = function(editor) {
|
|||
};
|
||||
|
||||
this.$callKeyboardHandler = function (e, hashId, keyOrText, keyCode) {
|
||||
var env = {editor: this.$editor};
|
||||
var toExecute;
|
||||
var commands = this.$editor.commands;
|
||||
|
||||
|
|
@ -4830,7 +4829,7 @@ var KeyBinding = function(editor) {
|
|||
if (!toExecute || !toExecute.command) {
|
||||
if (hashId != 0 || keyCode != 0) {
|
||||
toExecute = {
|
||||
command: commands.findKeyCommand(env, hashId, keyOrText)
|
||||
command: commands.findKeyCommand(hashId, keyOrText)
|
||||
}
|
||||
} else {
|
||||
toExecute = {
|
||||
|
|
@ -4846,7 +4845,7 @@ var KeyBinding = function(editor) {
|
|||
if (toExecute && toExecute.command) {
|
||||
success = commands.exec(
|
||||
toExecute.command,
|
||||
env, toExecute.args
|
||||
this.$editor, toExecute.args
|
||||
);
|
||||
if (success) {
|
||||
event.stopEvent(e);
|
||||
|
|
@ -4918,286 +4917,285 @@ var lang = require("../lib/lang");
|
|||
function bindKey(win, mac) {
|
||||
return {
|
||||
win: win,
|
||||
mac: mac,
|
||||
sender: "editor"
|
||||
mac: mac
|
||||
};
|
||||
}
|
||||
|
||||
exports.commands = [{
|
||||
name: "selectall",
|
||||
bindKey: bindKey("Ctrl-A", "Command-A"),
|
||||
exec: function(env, args) { env.editor.selectAll(); }
|
||||
exec: function(editor) { editor.selectAll(); }
|
||||
}, {
|
||||
name: "removeline",
|
||||
bindKey: bindKey("Ctrl-D", "Command-D"),
|
||||
exec: function(env, args) { env.editor.removeLines(); }
|
||||
exec: function(editor) { editor.removeLines(); }
|
||||
}, {
|
||||
name: "gotoline",
|
||||
bindKey: bindKey("Ctrl-L", "Command-L"),
|
||||
exec: function(env, args) {
|
||||
exec: function(editor) {
|
||||
var line = parseInt(prompt("Enter line number:"));
|
||||
if (!isNaN(line)) {
|
||||
env.editor.gotoLine(line);
|
||||
editor.gotoLine(line);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
name: "togglecomment",
|
||||
bindKey: bindKey("Ctrl-7", "Command-7"),
|
||||
exec: function(env, args) { env.editor.toggleCommentLines(); }
|
||||
exec: function(editor) { editor.toggleCommentLines(); }
|
||||
}, {
|
||||
name: "findnext",
|
||||
bindKey: bindKey("Ctrl-K", "Command-G"),
|
||||
exec: function(env, args) { env.editor.findNext(); }
|
||||
exec: function(editor) { editor.findNext(); }
|
||||
}, {
|
||||
name: "findprevious",
|
||||
bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
|
||||
exec: function(env, args) { env.editor.findPrevious(); }
|
||||
exec: function(editor) { editor.findPrevious(); }
|
||||
}, {
|
||||
name: "find",
|
||||
bindKey: bindKey("Ctrl-F", "Command-F"),
|
||||
exec: function(env, args) {
|
||||
var needle = prompt("Find:", env.editor.getCopyText());
|
||||
env.editor.find(needle);
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:", editor.getCopyText());
|
||||
editor.find(needle);
|
||||
}
|
||||
}, {
|
||||
name: "replace",
|
||||
bindKey: bindKey("Ctrl-R", "Command-Option-F"),
|
||||
exec: function(env, args) {
|
||||
var needle = prompt("Find:", env.editor.getCopyText());
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:", editor.getCopyText());
|
||||
if (!needle)
|
||||
return;
|
||||
var replacement = prompt("Replacement:");
|
||||
if (!replacement)
|
||||
return;
|
||||
env.editor.replace(replacement, {needle: needle});
|
||||
editor.replace(replacement, {needle: needle});
|
||||
}
|
||||
}, {
|
||||
name: "replaceall",
|
||||
bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
|
||||
exec: function(env, args) {
|
||||
exec: function(editor) {
|
||||
var needle = prompt("Find:");
|
||||
if (!needle)
|
||||
return;
|
||||
var replacement = prompt("Replacement:");
|
||||
if (!replacement)
|
||||
return;
|
||||
env.editor.replaceAll(replacement, {needle: needle});
|
||||
editor.replaceAll(replacement, {needle: needle});
|
||||
}
|
||||
}, {
|
||||
name: "undo",
|
||||
bindKey: bindKey("Ctrl-Z", "Command-Z"),
|
||||
exec: function(env, args) { env.editor.undo(); }
|
||||
exec: function(editor) { editor.undo(); }
|
||||
}, {
|
||||
name: "redo",
|
||||
bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
|
||||
exec: function(env, args) { env.editor.redo(); }
|
||||
exec: function(editor) { editor.redo(); }
|
||||
}, {
|
||||
name: "overwrite",
|
||||
bindKey: bindKey("Insert", "Insert"),
|
||||
exec: function(env, args) { env.editor.toggleOverwrite(); }
|
||||
exec: function(editor) { editor.toggleOverwrite(); }
|
||||
}, {
|
||||
name: "copylinesup",
|
||||
bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"),
|
||||
exec: function(env, args) { env.editor.copyLinesUp(); }
|
||||
exec: function(editor) { editor.copyLinesUp(); }
|
||||
}, {
|
||||
name: "movelinesup",
|
||||
bindKey: bindKey("Alt-Up", "Option-Up"),
|
||||
exec: function(env, args) { env.editor.moveLinesUp(); }
|
||||
exec: function(editor) { editor.moveLinesUp(); }
|
||||
}, {
|
||||
name: "selecttostart",
|
||||
bindKey: bindKey("Ctrl-Shift-Home|Alt-Shift-Up", "Command-Shift-Up"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectFileStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectFileStart(); }
|
||||
}, {
|
||||
name: "gotostart",
|
||||
bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"),
|
||||
exec: function(env, args) { env.editor.navigateFileStart(); }
|
||||
exec: function(editor) { editor.navigateFileStart(); }
|
||||
}, {
|
||||
name: "selectup",
|
||||
bindKey: bindKey("Shift-Up", "Shift-Up"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectUp(); }
|
||||
exec: function(editor) { editor.getSelection().selectUp(); }
|
||||
}, {
|
||||
name: "golineup",
|
||||
bindKey: bindKey("Up", "Up|Ctrl-P"),
|
||||
exec: function(env, args) { env.editor.navigateUp(args.times); }
|
||||
exec: function(editor, args) { editor.navigateUp(args.times); }
|
||||
}, {
|
||||
name: "copylinesdown",
|
||||
bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"),
|
||||
exec: function(env, args) { env.editor.copyLinesDown(); }
|
||||
exec: function(editor) { editor.copyLinesDown(); }
|
||||
}, {
|
||||
name: "movelinesdown",
|
||||
bindKey: bindKey("Alt-Down", "Option-Down"),
|
||||
exec: function(env, args) { env.editor.moveLinesDown(); }
|
||||
exec: function(editor) { editor.moveLinesDown(); }
|
||||
}, {
|
||||
name: "selecttoend",
|
||||
bindKey: bindKey("Ctrl-Shift-End|Alt-Shift-Down", "Command-Shift-Down"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectFileEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectFileEnd(); }
|
||||
}, {
|
||||
name: "gotoend",
|
||||
bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"),
|
||||
exec: function(env, args) { env.editor.navigateFileEnd(); }
|
||||
exec: function(editor) { editor.navigateFileEnd(); }
|
||||
}, {
|
||||
name: "selectdown",
|
||||
bindKey: bindKey("Shift-Down", "Shift-Down"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectDown(); }
|
||||
exec: function(editor) { editor.getSelection().selectDown(); }
|
||||
}, {
|
||||
name: "golinedown",
|
||||
bindKey: bindKey("Down", "Down|Ctrl-N"),
|
||||
exec: function(env, args) { env.editor.navigateDown(args.times); }
|
||||
exec: function(editor, args) { editor.navigateDown(args.times); }
|
||||
}, {
|
||||
name: "selectwordleft",
|
||||
bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectWordLeft(); }
|
||||
exec: function(editor) { editor.getSelection().selectWordLeft(); }
|
||||
}, {
|
||||
name: "gotowordleft",
|
||||
bindKey: bindKey("Ctrl-Left", "Option-Left"),
|
||||
exec: function(env, args) { env.editor.navigateWordLeft(); }
|
||||
exec: function(editor) { editor.navigateWordLeft(); }
|
||||
}, {
|
||||
name: "selecttolinestart",
|
||||
bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineStart(); }
|
||||
}, {
|
||||
name: "gotolinestart",
|
||||
bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
|
||||
exec: function(env, args) { env.editor.navigateLineStart(); }
|
||||
exec: function(editor) { editor.navigateLineStart(); }
|
||||
}, {
|
||||
name: "selectleft",
|
||||
bindKey: bindKey("Shift-Left", "Shift-Left"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLeft(); }
|
||||
exec: function(editor) { editor.getSelection().selectLeft(); }
|
||||
}, {
|
||||
name: "gotoleft",
|
||||
bindKey: bindKey("Left", "Left|Ctrl-B"),
|
||||
exec: function(env, args) { env.editor.navigateLeft(args.times); }
|
||||
exec: function(editor, args) { editor.navigateLeft(args.times); }
|
||||
}, {
|
||||
name: "selectwordright",
|
||||
bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectWordRight(); }
|
||||
exec: function(editor) { editor.getSelection().selectWordRight(); }
|
||||
}, {
|
||||
name: "gotowordright",
|
||||
bindKey: bindKey("Ctrl-Right", "Option-Right"),
|
||||
exec: function(env, args) { env.editor.navigateWordRight(); }
|
||||
exec: function(editor) { editor.navigateWordRight(); }
|
||||
}, {
|
||||
name: "selecttolineend",
|
||||
bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineEnd(); }
|
||||
}, {
|
||||
name: "gotolineend",
|
||||
bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
|
||||
exec: function(env, args) { env.editor.navigateLineEnd(); }
|
||||
exec: function(editor) { editor.navigateLineEnd(); }
|
||||
}, {
|
||||
name: "selectright",
|
||||
bindKey: bindKey("Shift-Right", "Shift-Right"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectRight(); }
|
||||
exec: function(editor) { editor.getSelection().selectRight(); }
|
||||
}, {
|
||||
name: "gotoright",
|
||||
bindKey: bindKey("Right", "Right|Ctrl-F"),
|
||||
exec: function(env, args) { env.editor.navigateRight(args.times); }
|
||||
exec: function(editor, args) { editor.navigateRight(args.times); }
|
||||
}, {
|
||||
name: "selectpagedown",
|
||||
bindKey: bindKey("Shift-PageDown", "Shift-PageDown"),
|
||||
exec: function(env, args) { env.editor.selectPageDown(); }
|
||||
exec: function(editor) { editor.selectPageDown(); }
|
||||
}, {
|
||||
name: "pagedown",
|
||||
bindKey: bindKey(null, "PageDown"),
|
||||
exec: function(env, args) { env.editor.scrollPageDown(); }
|
||||
exec: function(editor) { editor.scrollPageDown(); }
|
||||
}, {
|
||||
name: "gotopagedown",
|
||||
bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"),
|
||||
exec: function(env, args) { env.editor.gotoPageDown(); }
|
||||
exec: function(editor) { editor.gotoPageDown(); }
|
||||
}, {
|
||||
name: "selectpageup",
|
||||
bindKey: bindKey("Shift-PageUp", "Shift-PageUp"),
|
||||
exec: function(env, args) { env.editor.selectPageUp(); }
|
||||
exec: function(editor) { editor.selectPageUp(); }
|
||||
}, {
|
||||
name: "pageup",
|
||||
bindKey: bindKey(null, "PageUp"),
|
||||
exec: function(env, args) { env.editor.scrollPageUp(); }
|
||||
exec: function(editor) { editor.scrollPageUp(); }
|
||||
}, {
|
||||
name: "gotopageup",
|
||||
bindKey: bindKey("PageUp", "Option-PageUp"),
|
||||
exec: function(env, args) { env.editor.gotoPageUp(); }
|
||||
exec: function(editor) { editor.gotoPageUp(); }
|
||||
}, {
|
||||
name: "selectlinestart",
|
||||
bindKey: bindKey("Shift-Home", "Shift-Home"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineStart(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineStart(); }
|
||||
}, {
|
||||
name: "selectlineend",
|
||||
bindKey: bindKey("Shift-End", "Shift-End"),
|
||||
exec: function(env, args) { env.editor.getSelection().selectLineEnd(); }
|
||||
exec: function(editor) { editor.getSelection().selectLineEnd(); }
|
||||
}, {
|
||||
name: "del",
|
||||
bindKey: bindKey("Delete", "Delete|Ctrl-D"),
|
||||
exec: function(env, args) { env.editor.remove("right"); }
|
||||
exec: function(editor) { editor.remove("right"); }
|
||||
}, {
|
||||
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) { env.editor.remove("left"); }
|
||||
exec: function(editor) { editor.remove("left"); }
|
||||
}, {
|
||||
name: "removetolinestart",
|
||||
bindKey: bindKey("Alt-Backspace", "Option-Backspace"),
|
||||
exec: function(env, args) { env.editor.removeToLineStart(); }
|
||||
exec: function(editor) { editor.removeToLineStart(); }
|
||||
}, {
|
||||
name: "removetolineend",
|
||||
bindKey: bindKey("Alt-Delete", "Ctrl-K"),
|
||||
exec: function(env, args) { env.editor.removeToLineEnd(); }
|
||||
exec: function(editor) { editor.removeToLineEnd(); }
|
||||
}, {
|
||||
name: "removewordleft",
|
||||
bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
|
||||
exec: function(env, args) { env.editor.removeWordLeft(); }
|
||||
exec: function(editor) { editor.removeWordLeft(); }
|
||||
}, {
|
||||
name: "removewordright",
|
||||
bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
|
||||
exec: function(env, args) { env.editor.removeWordRight(); }
|
||||
exec: function(editor) { editor.removeWordRight(); }
|
||||
}, {
|
||||
name: "outdent",
|
||||
bindKey: bindKey("Shift-Tab", "Shift-Tab"),
|
||||
exec: function(env, args) { env.editor.blockOutdent(); }
|
||||
exec: function(editor) { editor.blockOutdent(); }
|
||||
}, {
|
||||
name: "indent",
|
||||
bindKey: bindKey("Tab", "Tab"),
|
||||
exec: function(env, args) { env.editor.indent(); }
|
||||
exec: function(editor) { editor.indent(); }
|
||||
}, {
|
||||
name: "inserttext",
|
||||
exec: function(env, args) {
|
||||
env.editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
|
||||
exec: function(editor, args) {
|
||||
editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
|
||||
}
|
||||
}, {
|
||||
name: "centerselection",
|
||||
bindKey: bindKey(null, "Ctrl-L"),
|
||||
exec: function(env, args) { env.editor.centerSelection(); }
|
||||
exec: function(editor) { editor.centerSelection(); }
|
||||
}, {
|
||||
name: "splitline",
|
||||
bindKey: bindKey(null, "Ctrl-O"),
|
||||
exec: function(env, args) { env.editor.splitLine(); }
|
||||
exec: function(editor) { editor.splitLine(); }
|
||||
}, {
|
||||
name: "transposeletters",
|
||||
bindKey: bindKey("Ctrl-T", "Ctrl-T"),
|
||||
exec: function(env, args) { env.editor.transposeLetters(); }
|
||||
exec: function(editor) { editor.transposeLetters(); }
|
||||
}, {
|
||||
name: "fold",
|
||||
bindKey: bindKey("Alt-L", "Alt-L"),
|
||||
exec: function(env) {
|
||||
env.editor.session.toggleFold(false);
|
||||
exec: function(editor) {
|
||||
editor.session.toggleFold(false);
|
||||
}
|
||||
}, {
|
||||
name: "unfold",
|
||||
bindKey: bindKey("Alt-Shift-L", "Alt-Shift-L"),
|
||||
exec: function(env) {
|
||||
env.editor.session.toggleFold(true);
|
||||
exec: function(editor) {
|
||||
editor.session.toggleFold(true);
|
||||
}
|
||||
}, {
|
||||
name: "foldall",
|
||||
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
|
||||
exec: function(env) {
|
||||
env.editor.session.foldAll();
|
||||
exec: function(editor) {
|
||||
editor.session.foldAll();
|
||||
}
|
||||
}, {
|
||||
name: "unfoldall",
|
||||
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
|
||||
exec: function(env) {
|
||||
env.editor.session.unFoldAll();
|
||||
exec: function(editor) {
|
||||
editor.session.unFoldAll();
|
||||
}
|
||||
}];
|
||||
|
||||
|
|
@ -10467,12 +10465,15 @@ Search.SELECTION = 2;
|
|||
|
||||
exports.Search = Search;
|
||||
});
|
||||
__ace_shadowed__.define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent'], function(require, exports, module) {
|
||||
__ace_shadowed__.define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
|
||||
|
||||
var keyUtil = require("../lib/keys");
|
||||
var useragent = require("../lib/useragent");
|
||||
|
||||
var CommandManager = function(commands) {
|
||||
var CommandManager = function(platform, commands) {
|
||||
if (typeof platform !== "string")
|
||||
throw new TypeError("'platform' argument must be either 'mac' or 'win'");
|
||||
|
||||
this.platform = platform;
|
||||
this.commands = {};
|
||||
this.commmandKeyBinding = {};
|
||||
|
||||
|
|
@ -10483,6 +10484,9 @@ var CommandManager = function(commands) {
|
|||
(function() {
|
||||
|
||||
this.addCommand = function(command) {
|
||||
if (this.commands[command.name])
|
||||
this.removeCommand(command);
|
||||
|
||||
this.commands[command.name] = command;
|
||||
|
||||
if (command.bindKey) {
|
||||
|
|
@ -10490,12 +10494,12 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
};
|
||||
|
||||
function removeCommand(command) {
|
||||
this.removeCommand = function(command) {
|
||||
var name = (typeof command === 'string' ? command : command.name);
|
||||
command = this.commands[name];
|
||||
delete commands[name];
|
||||
delete this.commands[name];
|
||||
|
||||
// exaustive search is a little bit brute force but since removeCommand is
|
||||
// exaustive search is brute force but since removeCommand is
|
||||
// not a performance critical operation this should be OK
|
||||
var ckb = this.commmandKeyBinding;
|
||||
for (var hashId in ckb) {
|
||||
|
|
@ -10506,15 +10510,13 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
};
|
||||
|
||||
var platform = useragent.isMac ? "mac" : "win";
|
||||
|
||||
this._buildKeyHash = function(command) {
|
||||
var binding = command.bindKey;
|
||||
var key = binding[platform];
|
||||
var key = binding[this.platform];
|
||||
var ckb = this.commmandKeyBinding;
|
||||
|
||||
if(!binding[platform]) {
|
||||
return;
|
||||
if(!binding[this.platform]) {
|
||||
return;
|
||||
}
|
||||
|
||||
key.split("|").forEach(function(keyPart) {
|
||||
|
|
@ -10527,7 +10529,7 @@ var CommandManager = function(commands) {
|
|||
function parseKeys(keys, val, ret) {
|
||||
var key;
|
||||
var hashId = 0;
|
||||
var parts = splitSafe(keys, "\\-", null, true);
|
||||
var parts = splitSafe(keys);
|
||||
|
||||
for (var i=0, l = parts.length; i < l; i++) {
|
||||
if (keyUtil.KEY_MODS[parts[i]])
|
||||
|
|
@ -10542,27 +10544,31 @@ var CommandManager = function(commands) {
|
|||
}
|
||||
}
|
||||
|
||||
function splitSafe(s, separator, limit, bLowerCase) {
|
||||
return (bLowerCase && s.toLowerCase() || s)
|
||||
.replace(/(?:^\s+|\n|\s+$)/g, "")
|
||||
.split(new RegExp("[\\s ]*" + separator + "[\\s ]*", "g"), limit || 999);
|
||||
function splitSafe(s, separator) {
|
||||
return (s.toLowerCase()
|
||||
.trim()
|
||||
.split(new RegExp("[\\s ]*\\-[\\s ]*", "g"), 999));
|
||||
}
|
||||
|
||||
this.findKeyCommand = function findKeyCommand(env, hashId, textOrKey) {
|
||||
this.findKeyCommand = function findKeyCommand(hashId, textOrKey) {
|
||||
// Convert keyCode to the string representation.
|
||||
if (typeof textOrKey == "number") {
|
||||
textOrKey = keyUtil.keyCodeToString(textOrKey);
|
||||
}
|
||||
|
||||
|
||||
var ckbr = this.commmandKeyBinding;
|
||||
return ckbr[hashId] && ckbr[hashId][textOrKey];
|
||||
return ckbr[hashId] && ckbr[hashId][textOrKey.toLowerCase()];
|
||||
}
|
||||
|
||||
this.exec = function(command, env, args) {
|
||||
this.exec = function(command, editor, args) {
|
||||
if (typeof command === 'string')
|
||||
command = this.commands[command];
|
||||
|
||||
command.exec(env, args || {});
|
||||
if (!command)
|
||||
return false;
|
||||
|
||||
command.exec(editor, args || {});
|
||||
return true;
|
||||
};
|
||||
|
||||
}).call(CommandManager.prototype);
|
||||
|
|
@ -10723,12 +10729,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
// Imports CSS once per DOM document ('ace_editor' serves as an identifier).
|
||||
dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
|
||||
dom.addCssClass(this.container, "ace_editor");
|
||||
|
||||
// Chrome has some strange rendering issues if this is not done async
|
||||
setTimeout(function() {
|
||||
dom.addCssClass(this.container, "ace_editor");
|
||||
}.bind(this), 0)
|
||||
dom.addCssClass(container, "ace_editor");
|
||||
}, 0)
|
||||
|
||||
this.setTheme(theme);
|
||||
|
||||
|
|
@ -13166,486 +13171,6 @@ exports.cssText = ".ace-tm .ace_editor {\
|
|||
color: rgb(255, 0, 0)\
|
||||
}";
|
||||
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/index', ['require', 'exports', 'module' , 'pilot/browser_focus', 'pilot/dom', 'pilot/event', 'pilot/event_emitter', 'pilot/fixoldbrowsers', 'pilot/keys', 'pilot/lang', 'pilot/oop', 'pilot/useragent', 'pilot/canon'], function(require, exports, module) {
|
||||
require("pilot/browser_focus");
|
||||
require("pilot/dom");
|
||||
require("pilot/event");
|
||||
require("pilot/event_emitter");
|
||||
require("pilot/fixoldbrowsers");
|
||||
require("pilot/keys");
|
||||
require("pilot/lang");
|
||||
require("pilot/oop");
|
||||
require("pilot/useragent");
|
||||
require("pilot/canon");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/browser_focus', ['require', 'exports', 'module' , 'ace/lib/browser_focus'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/browser_focus' is deprecated. Use 'ace/lib/browser_focus' instead");
|
||||
module.exports = require("ace/lib/browser_focus");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/dom', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/dom' is deprecated. Use 'ace/lib/dom' instead");
|
||||
module.exports = require("ace/lib/dom");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/event', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/event' is deprecated. Use 'ace/lib/event' instead");
|
||||
module.exports = require("ace/lib/event");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/event_emitter', ['require', 'exports', 'module' , 'ace/lib/event_emitter'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/event_emitter' is deprecated. Use 'ace/lib/event_emitter' instead");
|
||||
module.exports = require("ace/lib/event_emitter");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/fixoldbrowsers' is deprecated. Use 'ace/lib/fixoldbrowsers' instead");
|
||||
module.exports = require("ace/lib/fixoldbrowsers");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/keys', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/keys' is deprecated. Use 'ace/lib/keys' instead");
|
||||
module.exports = require("ace/lib/keys");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/lang', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/lang' is deprecated. Use 'ace/lib/lang' instead");
|
||||
module.exports = require("ace/lib/lang");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/oop', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/oop' is deprecated. Use 'ace/lib/oop' instead");
|
||||
module.exports = require("ace/lib/oop");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/useragent', ['require', 'exports', 'module' , 'ace/lib/useragent'], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/useragent' is deprecated. Use 'ace/lib/useragent' instead");
|
||||
module.exports = require("ace/lib/useragent");
|
||||
});
|
||||
/* 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
|
||||
* 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 ***** */
|
||||
|
||||
__ace_shadowed__.define('pilot/canon', ['require', 'exports', 'module' ], function(require, exports, module) {
|
||||
console.warn("DEPRECATED: 'pilot/canon' is deprecated.");
|
||||
//return require("ace/lib/dom");
|
||||
|
||||
exports.addCommand = function() {
|
||||
console.warn("DEPRECATED: 'canon.addCommand()' is deprecated. Use 'editor.commands.addCommand(command)' instead.");
|
||||
console.trace();
|
||||
}
|
||||
|
||||
exports.removeCommand = function() {
|
||||
console.warn("DEPRECATED: 'canon.removeCommand()' is deprecated. Use 'editor.commands.removeCommand(command)' instead.");
|
||||
console.trace();
|
||||
}
|
||||
});
|
||||
__ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);\n" +
|
||||
"\n" +
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue