mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 13:03:42 +01:00
Rename IModel to ITextModel
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { IModel } from 'vs/editor/common/model/model';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
@@ -92,8 +92,8 @@ class DocumentAndEditorStateDelta {
|
||||
readonly isEmpty: boolean;
|
||||
|
||||
constructor(
|
||||
readonly removedDocuments: IModel[],
|
||||
readonly addedDocuments: IModel[],
|
||||
readonly removedDocuments: ITextModel[],
|
||||
readonly addedDocuments: ITextModel[],
|
||||
readonly removedEditors: EditorSnapshot[],
|
||||
readonly addedEditors: EditorSnapshot[],
|
||||
readonly oldActiveEditor: string,
|
||||
@@ -140,7 +140,7 @@ class DocumentAndEditorState {
|
||||
}
|
||||
|
||||
constructor(
|
||||
readonly documents: Set<IModel>,
|
||||
readonly documents: Set<ITextModel>,
|
||||
readonly editors: Map<string, EditorSnapshot>,
|
||||
readonly activeEditor: string,
|
||||
) {
|
||||
@@ -190,7 +190,7 @@ class MainThreadDocumentAndEditorStateComputer {
|
||||
}
|
||||
}
|
||||
|
||||
private _updateStateOnModelAdd(model: IModel): void {
|
||||
private _updateStateOnModelAdd(model: ITextModel): void {
|
||||
if (model.isTooLargeForHavingARichMode()) {
|
||||
// ignore
|
||||
return;
|
||||
@@ -219,7 +219,7 @@ class MainThreadDocumentAndEditorStateComputer {
|
||||
private _updateState(): void {
|
||||
|
||||
// models: ignore too large models
|
||||
const models = new Set<IModel>();
|
||||
const models = new Set<ITextModel>();
|
||||
for (const model of this._modelService.getModels()) {
|
||||
if (!model.isTooLargeForHavingARichMode()) {
|
||||
models.add(model);
|
||||
@@ -288,12 +288,12 @@ export class MainThreadDocumentsAndEditors {
|
||||
|
||||
private _onTextEditorAdd = new Emitter<MainThreadTextEditor[]>();
|
||||
private _onTextEditorRemove = new Emitter<string[]>();
|
||||
private _onDocumentAdd = new Emitter<IModel[]>();
|
||||
private _onDocumentAdd = new Emitter<ITextModel[]>();
|
||||
private _onDocumentRemove = new Emitter<string[]>();
|
||||
|
||||
readonly onTextEditorAdd: Event<MainThreadTextEditor[]> = this._onTextEditorAdd.event;
|
||||
readonly onTextEditorRemove: Event<string[]> = this._onTextEditorRemove.event;
|
||||
readonly onDocumentAdd: Event<IModel[]> = this._onDocumentAdd.event;
|
||||
readonly onDocumentAdd: Event<ITextModel[]> = this._onDocumentAdd.event;
|
||||
readonly onDocumentRemove: Event<string[]> = this._onDocumentRemove.event;
|
||||
|
||||
constructor(
|
||||
@@ -396,7 +396,7 @@ export class MainThreadDocumentsAndEditors {
|
||||
}
|
||||
}
|
||||
|
||||
private _toModelAddData(model: IModel): IModelAddedData {
|
||||
private _toModelAddData(model: ITextModel): IModelAddedData {
|
||||
return {
|
||||
uri: model.uri,
|
||||
versionId: model.getVersionId(),
|
||||
|
||||
Reference in New Issue
Block a user