Implement extension host restarting

This commit is contained in:
Alex Dima
2017-08-17 15:41:35 +02:00
parent 7e6d5644e1
commit c2e0b36d9b
4 changed files with 118 additions and 43 deletions

View File

@@ -99,10 +99,10 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
this._modelIsSynced = {};
this._toDispose = [];
this._toDispose.push(this._modelReferenceCollection);
this._toDispose.push(documentsAndEditors.onDocumentAdd(models => models.forEach(this._onModelAdded, this)));
this._toDispose.push(documentsAndEditors.onDocumentRemove(urls => urls.forEach(this._onModelRemoved, this)));
modelService.onModelModeChanged(this._onModelModeChanged, this, this._toDispose);
this._toDispose.push(this._modelReferenceCollection);
this._toDispose.push(modelService.onModelModeChanged(this._onModelModeChanged, this));
this._toDispose.push(textFileService.models.onModelSaved(e => {
if (this._shouldHandleFileEvent(e)) {