Encapsulate ITextSource in ITextBufferFactory

This commit is contained in:
Alex Dima
2018-01-05 16:53:24 +02:00
parent 0b0d4ac809
commit 48efc7fd2f
25 changed files with 157 additions and 148 deletions

View File

@@ -28,7 +28,6 @@ import { IProgressOptions, IProgressStep } from 'vs/platform/progress/common/pro
import * as editorCommon from 'vs/editor/common/editorCommon';
import * as modes from 'vs/editor/common/modes';
import { ITextSource } from 'vs/editor/common/model/textSource';
import { IConfigurationData, ConfigurationTarget, IConfigurationModel } from 'vs/platform/configuration/common/configuration';
import { IConfig } from 'vs/workbench/parts/debug/common/debug';
@@ -148,7 +147,7 @@ export interface MainThreadDecorationsShape extends IDisposable {
export interface MainThreadDocumentContentProvidersShape extends IDisposable {
$registerTextContentProvider(handle: number, scheme: string): void;
$unregisterTextContentProvider(handle: number): void;
$onVirtualDocumentChange(uri: UriComponents, value: ITextSource): void;
$onVirtualDocumentChange(uri: UriComponents, value: string): void;
}
export interface MainThreadDocumentsShape extends IDisposable {

View File

@@ -60,7 +60,7 @@ export class ExtHostDocumentContentProvider implements ExtHostDocumentContentPro
// broadcast event when content changed
if (!document.equalLines(textSource)) {
return this._proxy.$onVirtualDocumentChange(uri, textSource);
return this._proxy.$onVirtualDocumentChange(uri, value);
}
}, onUnexpectedError);