incorporate the debugger
This commit is contained in:
parent
05fd6df8fe
commit
0847bc73c5
29 changed files with 944 additions and 19 deletions
|
|
@ -33,8 +33,6 @@ ace.BackgroundTokenizer = function(tokenizer) {
|
|||
|
||||
self.fireUpdateEvent(startLine, textLines.length - 1);
|
||||
};
|
||||
|
||||
this.$initEvents();
|
||||
};
|
||||
|
||||
(function(){
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
ace.provide("ace.Document");
|
||||
|
||||
ace.Document = function(text, mode) {
|
||||
this.$initEvents();
|
||||
|
||||
this.lines = [];
|
||||
this.modified = true;
|
||||
this.selection = new ace.Selection(this);
|
||||
|
|
|
|||
|
|
@ -2,11 +2,9 @@ ace.provide("ace.MEventEmitter");
|
|||
|
||||
ace.MEventEmitter = function() {
|
||||
|
||||
this.$initEvents = function() {
|
||||
this.$eventRegistry = {};
|
||||
};
|
||||
|
||||
this.$dispatchEvent = function(eventName, e) {
|
||||
this.$eventRegistry = this.$eventRegistry || {};
|
||||
|
||||
var listeners = this.$eventRegistry[eventName];
|
||||
if (!listeners || !listeners.length) return;
|
||||
|
||||
|
|
@ -19,6 +17,8 @@ ace.MEventEmitter = function() {
|
|||
};
|
||||
|
||||
this.addEventListener = function(eventName, callback) {
|
||||
this.$eventRegistry = this.$eventRegistry || {};
|
||||
|
||||
var listeners = this.$eventRegistry[eventName];
|
||||
if (!listeners) {
|
||||
var listeners = this.$eventRegistry[eventName] = [];
|
||||
|
|
@ -29,6 +29,8 @@ ace.MEventEmitter = function() {
|
|||
};
|
||||
|
||||
this.removeEventListener = function(eventName, callback) {
|
||||
this.$eventRegistry = this.$eventRegistry || {};
|
||||
|
||||
var listeners = this.$eventRegistry[eventName];
|
||||
if (!listeners) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
ace.provide("ace.ScrollBar");
|
||||
|
||||
ace.ScrollBar = function(parent) {
|
||||
this.$initEvents();
|
||||
|
||||
this.element = document.createElement("div");
|
||||
this.element.className = "sb";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ ace.provide("ace.Selection");
|
|||
ace.Selection = function(doc) {
|
||||
this.doc = doc;
|
||||
|
||||
this.$initEvents();
|
||||
|
||||
this.clearSelection();
|
||||
this.selectionLead = {
|
||||
row: 0,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
var EventEmitter = function() {
|
||||
this.$initEvents();
|
||||
};
|
||||
var EventEmitter = function() {};
|
||||
|
||||
ace.implement(EventEmitter.prototype, ace.MEventEmitter);
|
||||
|
||||
var EventEmitterTest = new TestCase("EventEmitterTest", {
|
||||
|
|
@ -16,5 +15,4 @@ var EventEmitterTest = new TestCase("EventEmitterTest", {
|
|||
emitter.$dispatchEvent("juhu");
|
||||
assertTrue(called);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue