Add typed events to IModel

This commit is contained in:
Alex Dima
2016-05-25 15:30:09 +02:00
parent d6659f6dd3
commit 8913a2b964
40 changed files with 194 additions and 142 deletions

View File

@@ -521,7 +521,7 @@ export class MainThreadDocuments {
}
let modelUrl = model.uri;
this._modelIsSynced[modelUrl.toString()] = true;
this._modelToDisposeMap[modelUrl.toString()] = model.addBulkListener2((events) => this._onModelEvents(modelUrl, events));
this._modelToDisposeMap[modelUrl.toString()] = model.addBulkListener((events) => this._onModelEvents(modelUrl, events));
this._proxy._acceptModelAdd({
url: model.uri,
versionId: model.getVersionId(),

View File

@@ -91,7 +91,7 @@ export class MainThreadTextEditor {
this._lastSelection = [ new Selection(1,1,1,1) ];
this._setConfiguration(this._readConfiguration(this._model, this._codeEditor));
this._modelListeners = [];
this._modelListeners.push(this._model.addListener2(EditorCommon.EventType.ModelOptionsChanged, (e) => {
this._modelListeners.push(this._model.onDidChangeOptions((e) => {
this._setConfiguration(this._readConfiguration(this._model, this._codeEditor));
}));