This commit is contained in:
Johannes Rieken
2017-05-26 11:31:28 +02:00
parent 7e68adad64
commit b2b81e4f3e
3 changed files with 12 additions and 14 deletions

View File

@@ -371,8 +371,7 @@ export abstract class ExtHostDocumentsShape {
$provideTextDocumentContent(handle: number, uri: URI): TPromise<string> { throw ni(); }
$acceptModelModeChanged(strURL: string, oldModeId: string, newModeId: string): void { throw ni(); }
$acceptModelSaved(strURL: string): void { throw ni(); }
$acceptModelDirty(strURL: string): void { throw ni(); }
$acceptModelReverted(strURL: string): void { throw ni(); }
$acceptDirtyStateChanged(strURL: string, isDirty: boolean): void { throw ni(); }
$acceptModelChanged(strURL: string, e: IModelChangedEvent, isDirty: boolean): void { throw ni(); }
}

View File

@@ -171,18 +171,17 @@ export class ExtHostDocuments extends ExtHostDocumentsShape {
public $acceptModelSaved(strURL: string): void {
let data = this._documentsAndEditors.getDocument(strURL);
data._acceptIsDirty(false);
this.$acceptDirtyStateChanged(strURL, false);
this._onDidSaveDocument.fire(data.document);
}
public $acceptModelDirty(strURL: string): void {
let document = this._documentsAndEditors.getDocument(strURL);
document._acceptIsDirty(true);
}
public $acceptModelReverted(strURL: string): void {
let document = this._documentsAndEditors.getDocument(strURL);
document._acceptIsDirty(false);
public $acceptDirtyStateChanged(strURL: string, isDirty: boolean): void {
let data = this._documentsAndEditors.getDocument(strURL);
data._acceptIsDirty(isDirty);
this._onDidChangeDocument.fire({
document: data.document,
contentChanges: []
});
}
public $acceptModelChanged(strURL: string, events: IModelChangedEvent, isDirty: boolean): void {