This commit is contained in:
Resolver Developers 2011-10-03 11:32:23 +01:00
commit 60191322e6
140 changed files with 4698 additions and 1147 deletions

View file

@ -1,4 +1,4 @@
@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono);
@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);
.ace_editor {

View file

@ -91,6 +91,11 @@ var EditSession = function(text, mode) {
this.doc = doc;
doc.on("change", this.onChange.bind(this));
this.on("changeFold", this.onChangeFold.bind(this));
if (this.bgTokenizer) {
this.bgTokenizer.setDocument(this.getDocument());
this.bgTokenizer.start(0);
}
};
this.getDocument = function() {
@ -1016,7 +1021,7 @@ var EditSession = function(text, mode) {
} else {
lastRow = firstRow;
}
len = e.data.lines.length;
len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
} else {
len = lastRow - firstRow;
}

View file

@ -47,7 +47,7 @@ var event = require("pilot/event");
var lang = require("pilot/lang");
var useragent = require("pilot/useragent");
var TextInput = require("ace/keyboard/textinput").TextInput;
var MouseHandler = require("ace/mouse_handler").MouseHandler;
var MouseHandler = require("ace/mouse/mouse_handler").MouseHandler;
//var TouchHandler = require("ace/touch_handler").TouchHandler;
var KeyBinding = require("ace/keyboard/keybinding").KeyBinding;
var EditSession = require("ace/edit_session").EditSession;
@ -300,6 +300,8 @@ var Editor =function(renderer, session) {
lastRow = Infinity;
this.renderer.updateLines(range.start.row, lastRow);
this._dispatchEvent("change", e);
// update cursor because tab characters can influence the cursor position
this.renderer.updateCursor();
};
@ -382,7 +384,7 @@ var Editor =function(renderer, session) {
};
this.onChangeMode = function() {
this.renderer.updateText()
this.renderer.updateText();
};
this.onChangeWrapLimit = function() {
@ -418,7 +420,7 @@ var Editor =function(renderer, session) {
this._emit("cut", range);
if (!this.selection.isEmpty()) {
this.session.remove(range)
this.session.remove(range);
this.clearSelection();
}
};
@ -648,11 +650,11 @@ var Editor =function(renderer, session) {
this.$modeBehaviours = true;
this.setBehavioursEnabled = function (enabled) {
this.$modeBehaviours = enabled;
}
};
this.getBehavioursEnabled = function () {
return this.$modeBehaviours;
}
};
this.removeRight = function() {
if (this.$readOnly)
@ -661,7 +663,7 @@ var Editor =function(renderer, session) {
if (this.selection.isEmpty()) {
this.selection.selectRight();
}
this.session.remove(this.getSelectionRange())
this.session.remove(this.getSelectionRange());
this.clearSelection();
};
@ -760,17 +762,18 @@ var Editor =function(renderer, session) {
var cursor = this.getCursorPosition();
var column = cursor.column;
if (column == 0)
if (column === 0)
return;
var line = this.session.getLine(cursor.row);
var swap, range;
if (column < line.length) {
var swap = line.charAt(column) + line.charAt(column-1);
var range = new Range(cursor.row, column-1, cursor.row, column+1)
swap = line.charAt(column) + line.charAt(column-1);
range = new Range(cursor.row, column-1, cursor.row, column+1);
}
else {
var swap = line.charAt(column-1) + line.charAt(column-2);
var range = new Range(cursor.row, column-2, cursor.row, column)
swap = line.charAt(column-1) + line.charAt(column-2);
range = new Range(cursor.row, column-2, cursor.row, column);
}
this.session.replace(range, swap);
};
@ -814,7 +817,7 @@ var Editor =function(renderer, session) {
return;
var state = this.session.getState(this.getCursorPosition().row);
var rows = this.$getSelectedRows()
var rows = this.$getSelectedRows();
this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
};
@ -823,10 +826,11 @@ var Editor =function(renderer, session) {
return;
var rows = this.$getSelectedRows();
var range;
if (rows.last == 0 || rows.last+1 < this.session.getLength())
var range = new Range(rows.first, 0, rows.last+1, 0)
range = new Range(rows.first, 0, rows.last+1, 0);
else
var range = new Range(
range = new Range(
rows.first-1, this.session.getLine(rows.first-1).length,
rows.last, this.session.getLine(rows.last).length
);
@ -912,7 +916,6 @@ var Editor =function(renderer, session) {
this.renderer.hideComposition();
};
this.getFirstVisibleRow = function() {
return this.renderer.getFirstVisibleRow();
};
@ -1043,7 +1046,7 @@ var Editor =function(renderer, session) {
if (!this.isRowVisible(this.getCursorPosition().row)) {
this.scrollToLine(lineNumber, true);
}
},
};
this.navigateTo = function(row, column) {
this.clearSelection();
@ -1131,7 +1134,7 @@ var Editor =function(renderer, session) {
this.$tryReplace(range, replacement);
if (range !== null)
this.selection.setSelectionRange(range);
},
};
this.replaceAll = function(replacement, options) {
if (options) {
@ -1152,11 +1155,11 @@ var Editor =function(renderer, session) {
this.selection.setSelectionRange(selection);
this.$blockScrolling -= 1;
},
};
this.$tryReplace = function(range, replacement) {
var input = this.session.getTextRange(range);
var replacement = this.$search.replace(input, replacement);
replacement = this.$search.replace(input, replacement);
if (replacement !== null) {
range.end = this.session.replace(range, replacement);
return range;
@ -1175,7 +1178,7 @@ var Editor =function(renderer, session) {
options.needle = needle;
this.$search.set(options);
this.$find();
},
};
this.findNext = function(options) {
options = options || {};
@ -1218,7 +1221,7 @@ var Editor =function(renderer, session) {
this.destroy = function() {
this.renderer.destroy();
}
};
}).call(Editor.prototype);

View file

@ -64,7 +64,8 @@ StateHandler.prototype = {
if (binding.key) {
binding.key = new RegExp('^' + binding.key + '$');
} else if (Array.isArray(binding.regex)) {
binding.key = new RegExp('^' + binding.regex[1] + '$');
if (!('key' in binding))
binding.key = new RegExp('^' + binding.regex[1] + '$');
binding.regex = new RegExp(binding.regex.join('') + '$');
} else if (binding.regex) {
binding.regex = new RegExp(binding.regex + '$');

View file

@ -47,7 +47,8 @@ var TextInput = function(parentNode, host) {
var text = dom.createElement("textarea");
if (useragent.isTouchPad)
text.setAttribute('x-palm-disable-auto-cap',true);
text.setAttribute("x-palm-disable-auto-cap", true);
text.style.left = "-10000px";
parentNode.appendChild(text);
@ -63,7 +64,7 @@ var TextInput = function(parentNode, host) {
try {
text.select();
} catch (e) {}
};
}
function sendText(valueToSend) {
if (!copied) {
@ -159,10 +160,10 @@ var TextInput = function(parentNode, host) {
setTimeout(onCompositionEnd, 0);
if ((text.value.charCodeAt(0)|0) < 129) {
return;
};
}
inCompostion ? onCompositionUpdate() : onCompositionStart();
});
};
}
if ("onpropertychange" in text && !("oninput" in text))
event.addListener(text, "propertychange", onPropertyChange);

View file

@ -125,7 +125,7 @@ var Gutter = function(parentEl) {
var wrappedRowLength = this.session.getRowLength(i) - 1;
while (wrappedRowLength--) {
html.push("</div><div class='ace_gutter-cell' style='height:", config.lineHeight, "px'>&brvbar;</div>");
html.push("</div><div class='ace_gutter-cell' style='height:", config.lineHeight, "px'>\xA6");
}
html.push("</div>");

View file

@ -60,10 +60,10 @@ var Text = function(parentEl) {
oop.implement(this, EventEmitter);
this.EOF_CHAR = "&para;";
this.EOL_CHAR = "&not;";
this.TAB_CHAR = "&rarr;";
this.SPACE_CHAR = "&middot;";
this.EOF_CHAR = "\xB6"; //"&para;";
this.EOL_CHAR = "\xAC"; //"&not;";
this.TAB_CHAR = "\u2192"; //"&rarr;";
this.SPACE_CHAR = "\xB7"; //"&middot;";
this.$padding = 0;
this.setPadding = function(padding) {

View file

@ -37,44 +37,71 @@
define(function(require, exports, module) {
require("pilot/oop").inherits(CoffeeHighlightRules,
require("ace/mode/text_highlight_rules").TextHighlightRules);
var lang = require("pilot/lang");
var oop = require("pilot/oop");
var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules;
oop.inherits(CoffeeHighlightRules, TextHighlightRules);
function CoffeeHighlightRules() {
var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
var keywordend = "(?![$\\w]|\\s*:)";
var stringfill = {
token : "string",
merge : true,
regex : ".+"
};
var keywords = lang.arrayToMap((
"this|throw|then|try|typeof|super|switch|return|break|by)|continue|" +
"catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
"finally|function|while|when|new|not|delete|debugger|do|loop|of|off|" +
"or|on|unless|until|and|yes").split("|")
);
var langConstant = lang.arrayToMap((
"true|false|null|undefined").split("|")
);
var illegal = lang.arrayToMap((
"case|const|default|function|var|void|with|enum|export|implements|" +
"interface|let|package|private|protected|public|static|yield|" +
"__hasProp|extends|slice|bind|indexOf").split("|")
);
var supportClass = lang.arrayToMap((
"Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|" +
"RangeError|String|SyntaxError|Error|EvalError|TypeError|URIError").split("|")
);
var supportFunction = lang.arrayToMap((
"Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
"encodeURIComponent|decodeURI|decodeURIComponent|RangeError|String|" +
"SyntaxError|Error|EvalError|TypeError|URIError").split("|")
);
this.$rules = {
start : [
{
token : "identifier",
regex : "(?:@|(?:\\.|::)\\s*)" + identifier
regex : "(?:(?:\\.|::)\\s*)" + identifier
}, {
token : "keyword",
regex : "(?:t(?:h(?:is|row|en)|ry|ypeof)|s(?:uper|witch)|return|b(?:reak|y)|c(?:ontinue|atch|lass)|i(?:n(?:stanceof)?|s(?:nt)?|f)|e(?:lse|xtends)|f(?:or (?:own)?|inally|unction)|wh(?:ile|en)|n(?:ew|ot?)|d(?:e(?:lete|bugger)|o)|loop|o(?:ff?|[rn])|un(?:less|til)|and|yes)"
+ keywordend
token : "variable",
regex : "@" + identifier
}, {
token : "constant.language",
regex : "(?:true|false|null|undefined)" + keywordend
}, {
token : "invalid.illegal",
regex : "(?:c(?:ase|onst)|default|function|v(?:ar|oid)|with|e(?:num|xport)|i(?:mplements|nterface)|let|p(?:ackage|r(?:ivate|otected)|ublic)|static|yield|__(?:hasProp|extends|slice|bind|indexOf))"
+ keywordend
}, {
token : "language.support.class",
regex : "(?:Array|Boolean|Date|Function|Number|Object|R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|TypeError|URIError)"
+ keywordend
}, {
token : "language.support.function",
regex : "(?:Math|JSON|is(?:NaN|Finite)|parse(?:Int|Float)|encodeURI(?:Component)?|decodeURI(?:Component)?)"
+ keywordend
}, {
token : "identifier",
token: function(value) {
if (keywords.hasOwnProperty(value))
return "keyword";
else if (langConstant.hasOwnProperty(value))
return "constant.language";
else if (illegal.hasOwnProperty(value))
return "invalid.illegal";
else if (supportClass.hasOwnProperty(value))
return "language.support.class";
else if (supportFunction.hasOwnProperty(value))
return "language.support.function";
else
return "identifier";
},
regex : identifier
}, {
token : "constant.numeric",

View file

@ -0,0 +1,63 @@
/* ***** 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 ***** */
if (typeof process !== "undefined") {
require("../../../support/paths");
}
define(function(require, exports, module) {
var Mode = require("ace/mode/coffee").Mode;
var assert = require("ace/test/assertions");
module.exports = {
setUp : function() {
this.tokenizer = new Mode().getTokenizer();
},
"test: tokenize keyword": function() {
var tokens = this.tokenizer.getLineTokens("for", "start").tokens;
assert.equal(tokens.length, 1);
assert.equal(tokens[0].type, "keyword");
}
};
});
if (typeof module !== "undefined" && module === require.main) {
require("asyncjs").test.testcase(module.exports).exec()
}

View file

@ -51,6 +51,9 @@ var JavaScriptHighlightRules = function() {
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
"const|yield|import|get|set").split("|")
);
// keywords which can be followed by regular expressions
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
var buildinConstants = lang.arrayToMap(
("null|Infinity|NaN|undefined").split("|")
@ -105,9 +108,16 @@ var JavaScriptHighlightRules = function() {
}, {
token : "constant.numeric", // float
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
}, {
token : ["keyword", "text", "entity.name.function"],
regex : "(function)(\\s+)(" + identifierRe + ")"
}, {
token : "constant.language.boolean",
regex : "(?:true|false)\\b"
}, {
token : "keyword",
regex : "(?:" + kwBeforeRe + ")\\b",
next : "regex_allowed"
}, {
token : function(value) {
if (value == "this")
@ -151,6 +161,14 @@ var JavaScriptHighlightRules = function() {
// makes sure we don't mix up regexps with the divison operator
"regex_allowed": [
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment_regex_allowed"
}, {
token : "comment",
regex : "\\/\\/.*$"
}, {
token: "string.regexp",
regex: "\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])"
+ "|(?:\\\\/|[^\\]/]))*"
@ -167,10 +185,23 @@ var JavaScriptHighlightRules = function() {
next: "start"
}
],
"comment_regex_allowed" : [
{
token : "comment", // closing comment
regex : ".*?\\*\\/",
merge : true,
next : "regex_allowed"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
"comment" : [
{
token : "comment", // closing comment
regex : ".*?\\*\\/",
merge : true,
next : "start"
}, {
token : "comment", // comment spanning whole line

View file

@ -136,12 +136,33 @@ module.exports = {
assert.equal(7, tokens.length);
assert.equal("string.regexp", tokens[2].type);
assert.equal("string.regexp", tokens[6].type);
var tokens = this.tokenizer.getLineTokens("case /a/.test(c)", "start").tokens;
assert.equal(8, tokens.length);
assert.equal("string.regexp", tokens[2].type);
},
"test tokenize multi-line comment containing a single line comment" : function() {
var tokens = this.tokenizer.getLineTokens("/* foo // bar */", "start").tokens;
assert.equal(1, tokens.length);
assert.equal("comment", tokens[0].type);
var tokens = this.tokenizer.getLineTokens("/* foo // bar */", "regex_allowed").tokens;
assert.equal(1, tokens.length);
assert.equal("comment", tokens[0].type);
},
"test tokenize identifier with umlauts": function() {
var tokens = this.tokenizer.getLineTokens("füße", "start").tokens;
assert.equal(1, tokens.length);
},
"test // is not a regexp": function() {
var tokens = this.tokenizer.getLineTokens("{ // 123", "start").tokens;
assert.equal(3, tokens.length);
assert.equal("lparen", tokens[0].type);
assert.equal("text", tokens[1].type);
assert.equal("comment", tokens[2].type);
}
};

58
lib/ace/mode/latex.js Normal file
View file

@ -0,0 +1,58 @@
define(function(require, exports, module) {
var oop = require("pilot/oop");
var TextMode = require("ace/mode/text").Mode;
var Tokenizer = require("ace/tokenizer").Tokenizer;
var LatexHighlightRules = require("ace/mode/latex_highlight_rules").LatexHighlightRules;
var Range = require("ace/range").Range;
var Mode = function()
{
this.$tokenizer = new Tokenizer(new LatexHighlightRules().getRules());
};
oop.inherits(Mode, TextMode);
(function()
{
this.toggleCommentLines = function(state, doc, startRow, endRow) {
// This code is adapted from ruby.js
var outdent = true;
var outentedRows = [];
// LaTeX comments begin with % and go to the end of the line
var commentRegEx = /^(\s*)\%/;
for (var i = startRow; i <= endRow; i++) {
if (!commentRegEx.test(doc.getLine(i))) {
outdent = false;
break;
}
}
if (outdent) {
var deleteRange = new Range(0, 0, 0, 0);
for (var i = startRow; i <= endRow; i++) {
var line = doc.getLine(i);
var m = line.match(commentRegEx);
deleteRange.start.row = i;
deleteRange.end.row = i;
deleteRange.end.column = m[0].length;
doc.replace(deleteRange, m[1]);
}
}
else {
doc.indentRows(startRow, endRow, "%");
}
};
// There is no universally accepted way of indenting a tex document
// so just maintain the indentation of the previous line
this.getNextLineIndent = function(state, line, tab) {
return this.$getIndent(line);
};
}).call(Mode.prototype);
exports.Mode = Mode;
});

View file

@ -0,0 +1,38 @@
define(function(require, exports, module) {
var oop = require("pilot/oop");
var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules;
var LatexHighlightRules = function()
{
this.$rules = {
"start" : [{
// A tex command e.g. \foo
token : "keyword",
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)",
}, {
// Curly and square braces
token : "lparen",
regex : "[[({]"
}, {
// Curly and square braces
token : "rparen",
regex : "[\\])}]"
}, {
// Inline math between two $ symbols
token : "string",
regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
}, {
// A comment. Tex comments start with % and go to
// the end of the line
token : "comment",
regex : "%.*$"
}]
};
};
oop.inherits(LatexHighlightRules, TextHighlightRules);
exports.LatexHighlightRules = LatexHighlightRules;
});

View file

@ -21,7 +21,7 @@
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
* Mike de Boer <mike 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
@ -41,6 +41,7 @@ define(function(require, exports, module) {
var event = require("pilot/event");
var dom = require("pilot/dom");
var EventEmitter = require("pilot/event_emitter").EventEmitter;
var BrowserFocus = require("pilot/browser_focus").BrowserFocus;
var STATE_UNKNOWN = 0;
@ -50,63 +51,30 @@ var STATE_DRAG = 2;
var DRAG_TIMER = 250; // milliseconds
var DRAG_OFFSET = 5; // pixels
var MouseHandler = function(editor) {
function DefaultHandlers(editor) {
this.editor = editor;
this.$clickSelection = null;
this.browserFocus = new BrowserFocus();
event.addListener(editor.container, "mousedown", function(e) {
editor.focus();
return event.preventDefault(e);
});
event.addListener(editor.container, "selectstart", function(e) {
return event.preventDefault(e);
});
var mouseTarget = editor.renderer.getMouseEventTarget();
event.addListener(mouseTarget, "mousedown", this.onMouseDown.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, this.onMouseDoubleClick.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, this.onMouseTripleClick.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 4, 600, this.onMouseQuadClick.bind(this));
event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this));
};
editor.setDefaultHandler("mousedown", this.onMouseDown.bind(this));
editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(this));
editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(this));
editor.setDefaultHandler("quadclick", this.onQuadClick.bind(this));
editor.setDefaultHandler("mousewheel", this.onScroll.bind(this));
}
(function() {
this.$scrollSpeed = 1;
this.setScrollSpeed = function(speed) {
this.$scrollSpeed = speed;
};
this.getScrollSpeed = function() {
return this.$scrollSpeed;
};
this.$getEventPosition = function(e) {
var pageX = event.getDocumentX(e);
var pageY = event.getDocumentY(e);
var pos = this.editor.renderer.screenToTextCoordinates(pageX, pageY);
pos.row = Math.max(0, Math.min(pos.row, this.editor.session.getLength()-1));
return pos;
};
this.$distance = function(ax, ay, bx, by) {
return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
};
this.onMouseDown = function(e) {
var pageX = event.getDocumentX(e);
var pageY = event.getDocumentY(e);
var pos = this.$getEventPosition(e);
this.onMouseDown = function(ev) {
var inSelection = ev.inSelection();
var pageX = ev.pageX;
var pageY = ev.pageY;
var pos = ev.getDocumentPosition();
var editor = this.editor;
var self = this;
var _self = this;
var selectionRange = editor.getSelectionRange();
var selectionEmpty = selectionRange.isEmpty();
var inSelection = !editor.getReadOnly()
&& !selectionEmpty
&& selectionRange.contains(pos.row, pos.column);
var state = STATE_UNKNOWN;
// if this click caused the editor to be focused should not clear the
@ -115,14 +83,14 @@ var MouseHandler = function(editor) {
inSelection && (
!this.browserFocus.isFocused()
|| new Date().getTime() - this.browserFocus.lastFocus < 20
|| !this.editor.isFocused()
|| !editor.isFocused()
)
) {
this.editor.focus();
editor.focus();
return;
}
var button = event.getButton(e);
var button = ev.getButton();
if (button !== 0) {
if (selectionEmpty) {
editor.moveCursorToPosition(pos);
@ -132,7 +100,8 @@ var MouseHandler = function(editor) {
event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
}
return;
} else {
}
else {
// Select the fold as the user clicks it.
var fold = editor.session.getFoldAt(pos.row, pos.column, 1);
if (fold) {
@ -164,7 +133,7 @@ var MouseHandler = function(editor) {
else if (state == STATE_DRAG)
onMouseDragSelectionEnd();
self.$clickSelection = null;
_self.$clickSelection = null;
state = STATE_UNKNOWN;
};
@ -172,7 +141,7 @@ var MouseHandler = function(editor) {
dom.removeCssClass(editor.container, "ace_dragging");
editor.session.removeMarker(dragSelectionMarker);
if (!self.$clickSelection) {
if (!editor.$mouseHandler.$clickSelection) {
if (!dragCursor) {
editor.moveCursorToPosition(pos);
editor.selection.clearSelection(pos.row, pos.column);
@ -202,16 +171,16 @@ var MouseHandler = function(editor) {
return;
if (state == STATE_UNKNOWN) {
var distance = self.$distance(pageX, pageY, mousePageX, mousePageY);
var distance = calcDistance(pageX, pageY, mousePageX, mousePageY);
var time = (new Date()).getTime();
if (distance > DRAG_OFFSET) {
state = STATE_SELECT;
var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
onStartSelect(cursor);
} else if ((time - mousedownTime) > DRAG_TIMER) {
}
else if ((time - mousedownTime) > DRAG_TIMER) {
state = STATE_DRAG;
dragRange = editor.getSelectionRange();
var style = editor.getSelectionStyle();
@ -229,10 +198,11 @@ var MouseHandler = function(editor) {
};
function onStartSelect(pos) {
if (e.shiftKey)
editor.selection.selectToPosition(pos)
if (ev.getShiftKey()) {
editor.selection.selectToPosition(pos);
}
else {
if (!self.$clickSelection) {
if (!_self.$clickSelection) {
editor.moveCursorToPosition(pos);
editor.selection.clearSelection(pos.row, pos.column);
}
@ -241,17 +211,20 @@ var MouseHandler = function(editor) {
}
var onUpdateSelectionInterval = function() {
var anchor;
var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY);
cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1));
if (self.$clickSelection) {
if (self.$clickSelection.contains(cursor.row, cursor.column)) {
editor.selection.setSelectionRange(self.$clickSelection);
} else {
if (self.$clickSelection.compare(cursor.row, cursor.column) == -1) {
var anchor = self.$clickSelection.end;
} else {
var anchor = self.$clickSelection.start;
if (_self.$clickSelection) {
if (_self.$clickSelection.contains(cursor.row, cursor.column)) {
editor.selection.setSelectionRange(_self.$clickSelection);
}
else {
if (_self.$clickSelection.compare(cursor.row, cursor.column) == -1) {
anchor = _self.$clickSelection.end;
}
else {
anchor = _self.$clickSelection.start;
}
editor.selection.setSelectionAnchor(anchor.row, anchor.column);
editor.selection.selectToPosition(cursor);
@ -274,46 +247,55 @@ var MouseHandler = function(editor) {
event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
var timerId = setInterval(onSelectionInterval, 20);
return event.preventDefault(e);
return ev.preventDefault();
};
this.onMouseDoubleClick = function(e) {
this.onDoubleClick = function(ev) {
var pos = ev.getDocumentPosition();
var editor = this.editor;
var pos = this.$getEventPosition(e);
// If the user dclicked on a fold, then expand it.
var fold = editor.session.getFoldAt(pos.row, pos.column, 1);
if (fold) {
editor.session.expandFold(fold);
} else {
}
else {
editor.moveCursorToPosition(pos);
editor.selection.selectWord();
this.$clickSelection = editor.getSelectionRange();
}
};
this.onMouseTripleClick = function(e) {
var pos = this.$getEventPosition(e);
this.editor.moveCursorToPosition(pos);
this.editor.selection.selectLine();
this.$clickSelection = this.editor.getSelectionRange();
this.onTripleClick = function(ev) {
var pos = ev.getDocumentPosition();
var editor = this.editor;
editor.moveCursorToPosition(pos);
editor.selection.selectLine();
this.$clickSelection = editor.getSelectionRange();
};
this.onMouseQuadClick = function(e) {
this.editor.selectAll();
this.$clickSelection = this.editor.getSelectionRange();
this.onQuadClick = function(ev) {
var editor = this.editor;
editor.selectAll();
this.$clickSelection = editor.getSelectionRange();
};
this.onMouseWheel = function(e) {
var speed = this.$scrollSpeed * 2;
this.editor.renderer.scrollBy(e.wheelX * speed, e.wheelY * speed);
if (this.editor.renderer.isScrollableBy(e.wheelX, e.wheelY))
return event.preventDefault(e);
this.onScroll = function(ev) {
var editor = this.editor;
editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
if (editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed))
return ev.preventDefault();
};
}).call(DefaultHandlers.prototype);
exports.DefaultHandlers = DefaultHandlers;
}).call(MouseHandler.prototype);
function calcDistance(ax, ay, bx, by) {
return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
}
exports.MouseHandler = MouseHandler;
});

0
lib/ace/mouse/dragdrop.js vendored Normal file
View file

View file

@ -0,0 +1,133 @@
/* 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(function(require, exports, module) {
var event = require("pilot/event");
var dom = require("pilot/dom");
/**
* Custom Ace mouse event
*/
var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
this.domEvent = domEvent;
this.editor = editor;
this.pageX = event.getDocumentX(domEvent);
this.pageY = event.getDocumentY(domEvent);
this.$pos = null;
this.$inSelection = null;
this.propagationStopped = false;
this.defaultPrevented = false;
};
(function() {
this.stopPropagation = function() {
event.stopPropagation(this.domEvent);
this.propagationStopped = true;
};
this.preventDefault = function() {
event.preventDefault(this.domEvent);
this.defaultPrevented = true;
};
/**
* Get the document position below the mouse cursor
*
* @return {Object} 'row' and 'column' of the document position
*/
this.getDocumentPosition = function() {
if (this.$pos)
return this.$pos;
var pageX = event.getDocumentX(this.domEvent);
var pageY = event.getDocumentY(this.domEvent);
this.$pos = this.editor.renderer.screenToTextCoordinates(pageX, pageY);
this.$pos.row = Math.max(0, Math.min(this.$pos.row, this.editor.session.getLength()-1));
return this.$pos;
};
/**
* Check if the mouse cursor is inside of the text selection
*
* @return {Boolean} whether the mouse cursor is inside of the selection
*/
this.inSelection = function() {
if (this.$inSelection !== null)
return this.$inSelection;
var editor = this.editor;
if (editor.getReadOnly()) {
this.$inSelection = false;
}
else {
var selectionRange = editor.getSelectionRange();
if (selectionRange.isEmpty())
this.$inSelection = false;
else {
var pos = this.getDocumentPosition();
this.$inSelection = selectionRange.contains(pos.row, pos.column);
}
}
return this.$inSelection;
};
/**
* Get the clicked mouse button
*
* @return {Number} 0 for left button, 1 for middle button, 2 for right button
*/
this.getButton = function() {
return event.getButton(this.domEvent);
};
/**
* @return {Boolean} whether the shift key was pressed when the event was emitted
*/
this.getShiftKey = function() {
return this.domEvent.shiftKey;
};
}).call(MouseEvent.prototype);
});

View file

@ -0,0 +1,115 @@
/* 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>
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var event = require("pilot/event");
var DefaultHandlers = require("ace/mouse/default_handlers").DefaultHandlers;
var MouseEvent = require("ace/mouse/mouse_event").MouseEvent;
var MouseHandler = function(editor) {
this.editor = editor;
this.defaultHandlers = new DefaultHandlers(editor);
event.addListener(editor.container, "mousedown", function(e) {
editor.focus();
return event.preventDefault(e);
});
event.addListener(editor.container, "selectstart", function(e) {
return event.preventDefault(e);
});
var mouseTarget = editor.renderer.getMouseEventTarget();
event.addListener(mouseTarget, "mousedown", this.onMouseDown.bind(this));
event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, this.onMouseDoubleClick.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, this.onMouseTripleClick.bind(this));
event.addMultiMouseDownListener(mouseTarget, 0, 4, 600, this.onMouseQuadClick.bind(this));
event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this));
};
(function() {
this.$scrollSpeed = 1;
this.setScrollSpeed = function(speed) {
this.$scrollSpeed = speed;
};
this.getScrollSpeed = function() {
return this.$scrollSpeed;
};
this.onMouseDown = function(e) {
this.editor._dispatchEvent("mousedown", new MouseEvent(e, this.editor));
};
this.onMouseMove = function(e) {
// optimization, because mousemove doesn't have a default handler.
var listeners = this.editor._eventRegistry && this.editor._eventRegistry["mousemove"];
if (!listeners || !listeners.length)
return;
this.editor._dispatchEvent("mousemove", new MouseEvent(e, this.editor));
};
this.onMouseDoubleClick = function(e) {
this.editor._dispatchEvent("dblclick", new MouseEvent(e, this.editor));
};
this.onMouseTripleClick = function(e) {
this.editor._dispatchEvent("tripleclick", new MouseEvent(e, this.editor));
};
this.onMouseQuadClick = function(e) {
this.editor._dispatchEvent("quadclick", new MouseEvent(e, this.editor));
};
this.onMouseWheel = function(e) {
var mouseEvent = new MouseEvent(e, this.editor);
mouseEvent.speed = this.$scrollSpeed * 2;
mouseEvent.wheelX = e.wheelX;
mouseEvent.wheelY = e.wheelY;
this.editor._dispatchEvent("mousewheel", mouseEvent);
};
}).call(MouseHandler.prototype);
exports.MouseHandler = MouseHandler;
});

View file

@ -204,6 +204,14 @@ define(function(require, exports, module) {
color:#606060;\
}\
\
.ace-clouds .ace_entity.ace_name {\
\
}\
\
.ace-clouds .ace_entity.ace_name.ace_function {\
\
}\
\
.ace-clouds .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -205,6 +205,14 @@ background-color:#E92E2E;\
color:#606060;\
}\
\
.ace-clouds-midnight .ace_entity.ace_name {\
\
}\
\
.ace-clouds-midnight .ace_entity.ace_name.ace_function {\
\
}\
\
.ace-clouds-midnight .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -206,6 +206,14 @@ color:#0088FF;\
\
}\
\
.ace-cobalt .ace_entity.ace_name {\
\
}\
\
.ace-cobalt .ace_entity.ace_name.ace_function {\
\
}\
\
.ace-cobalt .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -210,6 +210,14 @@ color:#5A525F;\
\
}\
\
.ace-dawn .ace_entity.ace_name {\
\
}\
\
.ace-dawn .ace_entity.ace_name.ace_function {\
\
}\
\
.ace-dawn .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -206,6 +206,14 @@ color:#BC9458;\
\
}\
\
.ace-idle-fingers .ace_entity.ace_name {\
color:#FFC66D;\
}\
\
.ace-idle-fingers .ace_entity.ace_name.ace_function {\
\
}\
\
.ace-idle-fingers .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -206,6 +206,14 @@ color:#706D5B;\
\
}\
\
.ace-kr-theme .ace_entity.ace_name {\
\
}\
\
.ace-kr-theme .ace_entity.ace_name.ace_function {\
\
}\
\
.ace-kr-theme .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -206,6 +206,14 @@ background-color:#151C19;\
color:#909993;\
}\
\
.ace-mono-industrial .ace_entity.ace_name {\
color:#5778B6;\
}\
\
.ace-mono-industrial .ace_entity.ace_name.ace_function {\
color:#A8B3AB;\
}\
\
.ace-mono-industrial .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -206,6 +206,14 @@ background-color:#AE81FF;\
color:#A6E22E;\
}\
\
.ace-monokai .ace_entity.ace_name {\
\
}\
\
.ace-monokai .ace_entity.ace_name.ace_function {\
color:#A6E22E;\
}\
\
.ace-monokai .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -205,6 +205,14 @@ color:#657B83;\
color:#93A1A1;\
}\
\
.ace-solarized-dark .ace_entity.ace_name {\
\
}\
\
.ace-solarized-dark .ace_entity.ace_name.ace_function {\
color:#268BD2;\
}\
\
.ace-solarized-dark .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -204,6 +204,14 @@ define(function(require, exports, module) {
color:#93A1A1;\
}\
\
.ace-solarized-light .ace_entity.ace_name {\
\
}\
\
.ace-solarized-light .ace_entity.ace_name.ace_function {\
color:#268BD2;\
}\
\
.ace-solarized-light .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -156,7 +156,11 @@ define(function(require, exports, module) {
color: rgb(104, 104, 91);\
}\
\
.ace-tm .ace_markup.ace_underline {\
.ace-tm .ace_entity.ace_name.ace_function {\
color: #0000A2;\
}\
\
.ace-tm .ace_markup.ace_markupine {\
text-decoration:underline;\
}\
\

261
lib/ace/theme/tomorrow.js Normal file
View file

@ -0,0 +1,261 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-tomorrow .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-tomorrow .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-tomorrow .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-tomorrow .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-tomorrow .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-tomorrow .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-tomorrow .ace_scroller {\
background-color: #FFFFFF;\
}\
\
.ace-tomorrow .ace_text-layer {\
cursor: text;\
color: #4D4D4C;\
}\
\
.ace-tomorrow .ace_cursor {\
border-left: 2px solid #AEAFAD;\
}\
\
.ace-tomorrow .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #AEAFAD;\
}\
\
.ace-tomorrow .ace_marker-layer .ace_selection {\
background: #D6D6D6;\
}\
\
.ace-tomorrow .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-tomorrow .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #D1D1D1;\
}\
\
.ace-tomorrow .ace_marker-layer .ace_active_line {\
background: #EFEFEF;\
}\
\
\
.ace-tomorrow .ace_invisible {\
color: #D1D1D1;\
}\
\
.ace-tomorrow .ace_keyword {\
color:#8959A8;\
}\
\
.ace-tomorrow .ace_keyword.ace_operator {\
color:#3E999F;\
}\
\
.ace-tomorrow .ace_constant {\
\
}\
\
.ace-tomorrow .ace_constant.ace_language {\
color:#F5871F;\
}\
\
.ace-tomorrow .ace_constant.ace_library {\
\
}\
\
.ace-tomorrow .ace_constant.ace_numeric {\
color:#F5871F;\
}\
\
.ace-tomorrow .ace_invalid {\
color:#FFFFFF;\
background-color:#C82829;\
}\
\
.ace-tomorrow .ace_invalid.ace_illegal {\
\
}\
\
.ace-tomorrow .ace_invalid.ace_deprecated {\
color:#FFFFFF;\
background-color:#8959A8;\
}\
\
.ace-tomorrow .ace_support {\
\
}\
\
.ace-tomorrow .ace_support.ace_function {\
color:#4271AE;\
}\
\
.ace-tomorrow .ace_function.ace_buildin {\
\
}\
\
.ace-tomorrow .ace_string {\
color:#718C00;\
}\
\
.ace-tomorrow .ace_string.ace_regexp {\
color:#C82829;\
}\
\
.ace-tomorrow .ace_comment {\
color:#8E908C;\
}\
\
.ace-tomorrow .ace_comment.ace_doc {\
\
}\
\
.ace-tomorrow .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-tomorrow .ace_variable {\
color:#C82829;\
}\
\
.ace-tomorrow .ace_variable.ace_language {\
\
}\
\
.ace-tomorrow .ace_xml_pe {\
\
}\
\
.ace-tomorrow .ace_meta {\
\
}\
\
.ace-tomorrow .ace_meta.ace_tag {\
color:#C82829;\
}\
\
.ace-tomorrow .ace_meta.ace_tag.ace_input {\
\
}\
\
.ace-tomorrow .ace_entity.ace_other.ace_attribute-name {\
color:#C82829;\
}\
\
.ace-tomorrow .ace_entity.ace_name {\
\
}\
\
.ace-tomorrow .ace_entity.ace_name.ace_function {\
color:#4271AE;\
}\
\
.ace-tomorrow .ace_markup.ace_underline {\
text-decoration:underline;\
}\
\
.ace-tomorrow .ace_markup.ace_heading {\
color:#718C00;\
}\
\
.ace-tomorrow .ace_markup.ace_heading.ace_1 {\
\
}\
\
.ace-tomorrow .ace_markup.ace_heading.ace_2 {\
\
}\
\
.ace-tomorrow .ace_markup.ace_heading.ace_3 {\
\
}\
\
.ace-tomorrow .ace_markup.ace_heading.ace_4 {\
\
}\
\
.ace-tomorrow .ace_markup.ace_heading.ace_5 {\
\
}\
\
.ace-tomorrow .ace_markup.ace_heading.ace_6 {\
\
}\
\
.ace-tomorrow .ace_markup.ace_list {\
\
}\
\
.ace-tomorrow .ace_collab.ace_user1 {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-tomorrow";
});

View file

@ -0,0 +1,261 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-tomorrow-night .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-tomorrow-night .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-tomorrow-night .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-tomorrow-night .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-tomorrow-night .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-tomorrow-night .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-tomorrow-night .ace_scroller {\
background-color: #1D1F21;\
}\
\
.ace-tomorrow-night .ace_text-layer {\
cursor: text;\
color: #C5C8C6;\
}\
\
.ace-tomorrow-night .ace_cursor {\
border-left: 2px solid #AEAFAD;\
}\
\
.ace-tomorrow-night .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #AEAFAD;\
}\
\
.ace-tomorrow-night .ace_marker-layer .ace_selection {\
background: #373B41;\
}\
\
.ace-tomorrow-night .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-tomorrow-night .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #4B4E55;\
}\
\
.ace-tomorrow-night .ace_marker-layer .ace_active_line {\
background: #282A2E;\
}\
\
\
.ace-tomorrow-night .ace_invisible {\
color: #4B4E55;\
}\
\
.ace-tomorrow-night .ace_keyword {\
color:#B294BB;\
}\
\
.ace-tomorrow-night .ace_keyword.ace_operator {\
color:#8ABEB7;\
}\
\
.ace-tomorrow-night .ace_constant {\
\
}\
\
.ace-tomorrow-night .ace_constant.ace_language {\
color:#DE935F;\
}\
\
.ace-tomorrow-night .ace_constant.ace_library {\
\
}\
\
.ace-tomorrow-night .ace_constant.ace_numeric {\
color:#DE935F;\
}\
\
.ace-tomorrow-night .ace_invalid {\
color:#CED2CF;\
background-color:#DF5F5F;\
}\
\
.ace-tomorrow-night .ace_invalid.ace_illegal {\
\
}\
\
.ace-tomorrow-night .ace_invalid.ace_deprecated {\
color:#CED2CF;\
background-color:#B798BF;\
}\
\
.ace-tomorrow-night .ace_support {\
\
}\
\
.ace-tomorrow-night .ace_support.ace_function {\
color:#81A2BE;\
}\
\
.ace-tomorrow-night .ace_function.ace_buildin {\
\
}\
\
.ace-tomorrow-night .ace_string {\
color:#B5BD68;\
}\
\
.ace-tomorrow-night .ace_string.ace_regexp {\
color:#CC6666;\
}\
\
.ace-tomorrow-night .ace_comment {\
color:#969896;\
}\
\
.ace-tomorrow-night .ace_comment.ace_doc {\
\
}\
\
.ace-tomorrow-night .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-tomorrow-night .ace_variable {\
color:#CC6666;\
}\
\
.ace-tomorrow-night .ace_variable.ace_language {\
\
}\
\
.ace-tomorrow-night .ace_xml_pe {\
\
}\
\
.ace-tomorrow-night .ace_meta {\
\
}\
\
.ace-tomorrow-night .ace_meta.ace_tag {\
color:#CC6666;\
}\
\
.ace-tomorrow-night .ace_meta.ace_tag.ace_input {\
\
}\
\
.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name {\
color:#CC6666;\
}\
\
.ace-tomorrow-night .ace_entity.ace_name {\
\
}\
\
.ace-tomorrow-night .ace_entity.ace_name.ace_function {\
color:#81A2BE;\
}\
\
.ace-tomorrow-night .ace_markup.ace_underline {\
text-decoration:underline;\
}\
\
.ace-tomorrow-night .ace_markup.ace_heading {\
color:#B5BD68;\
}\
\
.ace-tomorrow-night .ace_markup.ace_heading.ace_1 {\
\
}\
\
.ace-tomorrow-night .ace_markup.ace_heading.ace_2 {\
\
}\
\
.ace-tomorrow-night .ace_markup.ace_heading.ace_3 {\
\
}\
\
.ace-tomorrow-night .ace_markup.ace_heading.ace_4 {\
\
}\
\
.ace-tomorrow-night .ace_markup.ace_heading.ace_5 {\
\
}\
\
.ace-tomorrow-night .ace_markup.ace_heading.ace_6 {\
\
}\
\
.ace-tomorrow-night .ace_markup.ace_list {\
\
}\
\
.ace-tomorrow-night .ace_collab.ace_user1 {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-tomorrow-night";
});

View file

@ -0,0 +1,261 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-tomorrow-night-blue .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-tomorrow-night-blue .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-tomorrow-night-blue .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-tomorrow-night-blue .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-tomorrow-night-blue .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-tomorrow-night-blue .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-tomorrow-night-blue .ace_scroller {\
background-color: #002451;\
}\
\
.ace-tomorrow-night-blue .ace_text-layer {\
cursor: text;\
color: #FFFFFF;\
}\
\
.ace-tomorrow-night-blue .ace_cursor {\
border-left: 2px solid #FFFFFF;\
}\
\
.ace-tomorrow-night-blue .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FFFFFF;\
}\
\
.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\
background: #003F8E;\
}\
\
.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #404F7D;\
}\
\
.ace-tomorrow-night-blue .ace_marker-layer .ace_active_line {\
background: #00346E;\
}\
\
\
.ace-tomorrow-night-blue .ace_invisible {\
color: #404F7D;\
}\
\
.ace-tomorrow-night-blue .ace_keyword {\
color:#EBBBFF;\
}\
\
.ace-tomorrow-night-blue .ace_keyword.ace_operator {\
color:#99FFFF;\
}\
\
.ace-tomorrow-night-blue .ace_constant {\
\
}\
\
.ace-tomorrow-night-blue .ace_constant.ace_language {\
color:#FFC58F;\
}\
\
.ace-tomorrow-night-blue .ace_constant.ace_library {\
\
}\
\
.ace-tomorrow-night-blue .ace_constant.ace_numeric {\
color:#FFC58F;\
}\
\
.ace-tomorrow-night-blue .ace_invalid {\
color:#FFFFFF;\
background-color:#F99DA5;\
}\
\
.ace-tomorrow-night-blue .ace_invalid.ace_illegal {\
\
}\
\
.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\
color:#FFFFFF;\
background-color:#EBBBFF;\
}\
\
.ace-tomorrow-night-blue .ace_support {\
\
}\
\
.ace-tomorrow-night-blue .ace_support.ace_function {\
color:#BBDAFF;\
}\
\
.ace-tomorrow-night-blue .ace_function.ace_buildin {\
\
}\
\
.ace-tomorrow-night-blue .ace_string {\
color:#D1F1A9;\
}\
\
.ace-tomorrow-night-blue .ace_string.ace_regexp {\
color:#FF9DA4;\
}\
\
.ace-tomorrow-night-blue .ace_comment {\
color:#7285B7;\
}\
\
.ace-tomorrow-night-blue .ace_comment.ace_doc {\
\
}\
\
.ace-tomorrow-night-blue .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-tomorrow-night-blue .ace_variable {\
color:#FF9DA4;\
}\
\
.ace-tomorrow-night-blue .ace_variable.ace_language {\
\
}\
\
.ace-tomorrow-night-blue .ace_xml_pe {\
\
}\
\
.ace-tomorrow-night-blue .ace_meta {\
\
}\
\
.ace-tomorrow-night-blue .ace_meta.ace_tag {\
color:#FF9DA4;\
}\
\
.ace-tomorrow-night-blue .ace_meta.ace_tag.ace_input {\
\
}\
\
.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name {\
color:#FF9DA4;\
}\
\
.ace-tomorrow-night-blue .ace_entity.ace_name {\
\
}\
\
.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function {\
color:#BBDAFF;\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_underline {\
text-decoration:underline;\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_heading {\
color:#D1F1A9;\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_heading.ace_1 {\
\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_heading.ace_2 {\
\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_heading.ace_3 {\
\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_heading.ace_4 {\
\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_heading.ace_5 {\
\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_heading.ace_6 {\
\
}\
\
.ace-tomorrow-night-blue .ace_markup.ace_list {\
\
}\
\
.ace-tomorrow-night-blue .ace_collab.ace_user1 {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-tomorrow-night-blue";
});

View file

@ -0,0 +1,261 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-tomorrow-night-bright .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-tomorrow-night-bright .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-tomorrow-night-bright .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-tomorrow-night-bright .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-tomorrow-night-bright .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-tomorrow-night-bright .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-tomorrow-night-bright .ace_scroller {\
background-color: #000000;\
}\
\
.ace-tomorrow-night-bright .ace_text-layer {\
cursor: text;\
color: #DEDEDE;\
}\
\
.ace-tomorrow-night-bright .ace_cursor {\
border-left: 2px solid #9F9F9F;\
}\
\
.ace-tomorrow-night-bright .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #9F9F9F;\
}\
\
.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\
background: #424242;\
}\
\
.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #343434;\
}\
\
.ace-tomorrow-night-bright .ace_marker-layer .ace_active_line {\
background: #2A2A2A;\
}\
\
\
.ace-tomorrow-night-bright .ace_invisible {\
color: #343434;\
}\
\
.ace-tomorrow-night-bright .ace_keyword {\
color:#C397D8;\
}\
\
.ace-tomorrow-night-bright .ace_keyword.ace_operator {\
color:#70C0B1;\
}\
\
.ace-tomorrow-night-bright .ace_constant {\
\
}\
\
.ace-tomorrow-night-bright .ace_constant.ace_language {\
color:#E78C45;\
}\
\
.ace-tomorrow-night-bright .ace_constant.ace_library {\
\
}\
\
.ace-tomorrow-night-bright .ace_constant.ace_numeric {\
color:#E78C45;\
}\
\
.ace-tomorrow-night-bright .ace_invalid {\
color:#CED2CF;\
background-color:#DF5F5F;\
}\
\
.ace-tomorrow-night-bright .ace_invalid.ace_illegal {\
\
}\
\
.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\
color:#CED2CF;\
background-color:#B798BF;\
}\
\
.ace-tomorrow-night-bright .ace_support {\
\
}\
\
.ace-tomorrow-night-bright .ace_support.ace_function {\
color:#7AA6DA;\
}\
\
.ace-tomorrow-night-bright .ace_function.ace_buildin {\
\
}\
\
.ace-tomorrow-night-bright .ace_string {\
color:#B9CA4A;\
}\
\
.ace-tomorrow-night-bright .ace_string.ace_regexp {\
color:#D54E53;\
}\
\
.ace-tomorrow-night-bright .ace_comment {\
color:#969896;\
}\
\
.ace-tomorrow-night-bright .ace_comment.ace_doc {\
\
}\
\
.ace-tomorrow-night-bright .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-tomorrow-night-bright .ace_variable {\
color:#D54E53;\
}\
\
.ace-tomorrow-night-bright .ace_variable.ace_language {\
\
}\
\
.ace-tomorrow-night-bright .ace_xml_pe {\
\
}\
\
.ace-tomorrow-night-bright .ace_meta {\
\
}\
\
.ace-tomorrow-night-bright .ace_meta.ace_tag {\
color:#D54E53;\
}\
\
.ace-tomorrow-night-bright .ace_meta.ace_tag.ace_input {\
\
}\
\
.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name {\
color:#D54E53;\
}\
\
.ace-tomorrow-night-bright .ace_entity.ace_name {\
\
}\
\
.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function {\
color:#7AA6DA;\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_underline {\
text-decoration:underline;\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_heading {\
color:#B9CA4A;\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_heading.ace_1 {\
\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_heading.ace_2 {\
\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_heading.ace_3 {\
\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_heading.ace_4 {\
\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_heading.ace_5 {\
\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_heading.ace_6 {\
\
}\
\
.ace-tomorrow-night-bright .ace_markup.ace_list {\
\
}\
\
.ace-tomorrow-night-bright .ace_collab.ace_user1 {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-tomorrow-night-bright";
});

View file

@ -0,0 +1,261 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("pilot/dom");
var cssText = ".ace-tomorrow-night-eighties .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-tomorrow-night-eighties .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-tomorrow-night-eighties .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-tomorrow-night-eighties .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-tomorrow-night-eighties .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-tomorrow-night-eighties .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-tomorrow-night-eighties .ace_scroller {\
background-color: #2D2D2D;\
}\
\
.ace-tomorrow-night-eighties .ace_text-layer {\
cursor: text;\
color: #CCCCCC;\
}\
\
.ace-tomorrow-night-eighties .ace_cursor {\
border-left: 2px solid #CCCCCC;\
}\
\
.ace-tomorrow-night-eighties .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #CCCCCC;\
}\
\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\
background: #515151;\
}\
\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #6A6A6A;\
}\
\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_active_line {\
background: #393939;\
}\
\
\
.ace-tomorrow-night-eighties .ace_invisible {\
color: #6A6A6A;\
}\
\
.ace-tomorrow-night-eighties .ace_keyword {\
color:#CC99CC;\
}\
\
.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\
color:#66CCCC;\
}\
\
.ace-tomorrow-night-eighties .ace_constant {\
\
}\
\
.ace-tomorrow-night-eighties .ace_constant.ace_language {\
color:#F99157;\
}\
\
.ace-tomorrow-night-eighties .ace_constant.ace_library {\
\
}\
\
.ace-tomorrow-night-eighties .ace_constant.ace_numeric {\
color:#F99157;\
}\
\
.ace-tomorrow-night-eighties .ace_invalid {\
color:#CDCDCD;\
background-color:#F2777A;\
}\
\
.ace-tomorrow-night-eighties .ace_invalid.ace_illegal {\
\
}\
\
.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\
color:#CDCDCD;\
background-color:#CC99CC;\
}\
\
.ace-tomorrow-night-eighties .ace_support {\
\
}\
\
.ace-tomorrow-night-eighties .ace_support.ace_function {\
color:#6699CC;\
}\
\
.ace-tomorrow-night-eighties .ace_function.ace_buildin {\
\
}\
\
.ace-tomorrow-night-eighties .ace_string {\
color:#99CC99;\
}\
\
.ace-tomorrow-night-eighties .ace_string.ace_regexp {\
\
}\
\
.ace-tomorrow-night-eighties .ace_comment {\
color:#999999;\
}\
\
.ace-tomorrow-night-eighties .ace_comment.ace_doc {\
\
}\
\
.ace-tomorrow-night-eighties .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-tomorrow-night-eighties .ace_variable {\
color:#F2777A;\
}\
\
.ace-tomorrow-night-eighties .ace_variable.ace_language {\
\
}\
\
.ace-tomorrow-night-eighties .ace_xml_pe {\
\
}\
\
.ace-tomorrow-night-eighties .ace_meta {\
\
}\
\
.ace-tomorrow-night-eighties .ace_meta.ace_tag {\
color:#F2777A;\
}\
\
.ace-tomorrow-night-eighties .ace_meta.ace_tag.ace_input {\
\
}\
\
.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name {\
color:#F2777A;\
}\
\
.ace-tomorrow-night-eighties .ace_entity.ace_name {\
\
}\
\
.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function {\
color:#6699CC;\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_underline {\
text-decoration:underline;\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_heading {\
color:#99CC99;\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_heading.ace_1 {\
\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_heading.ace_2 {\
\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_heading.ace_3 {\
\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_heading.ace_4 {\
\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_heading.ace_5 {\
\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_heading.ace_6 {\
\
}\
\
.ace-tomorrow-night-eighties .ace_markup.ace_list {\
\
}\
\
.ace-tomorrow-night-eighties .ace_collab.ace_user1 {\
\
}";
// import CSS once
dom.importCssString(cssText);
exports.cssClass = "ace-tomorrow-night-eighties";
});

View file

@ -208,6 +208,14 @@ color:#5F5A60;\
\
}\
\
.ace-twilight .ace_entity.ace_name {\
\
}\
\
.ace-twilight .ace_entity.ace_name.ace_function {\
color:#AC885B;\
}\
\
.ace-twilight .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -207,6 +207,14 @@ define(function(require, exports, module) {
color:#99CC99;\
}\
\
.ace-vibrant-ink .ace_entity.ace_name {\
\
}\
\
.ace-vibrant-ink .ace_entity.ace_name.ace_function {\
color:#FFCC00;\
}\
\
.ace-vibrant-ink .ace_markup.ace_underline {\
text-decoration:underline;\
}\

View file

@ -633,7 +633,7 @@ var VirtualRenderer = function(container, theme) {
var pos = this.$cursorLayer.getPixelPosition();
var left = pos.left + this.$padding;
var left = pos.left;
var top = pos.top;
if (this.scrollTop > top) {

View file

@ -154,7 +154,10 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
};
this.emit = function(event, data) {
this.$worker.postMessage({event: event, data: data});
try {
this.$worker.postMessage({event: event, data: data});
}
catch(ex) {}
};
}).call(WorkerClient.prototype);