Renames ModeService to LanguageService

This commit is contained in:
Alex Dima 2021-12-08 14:43:31 +01:00
parent 91b97cec91
commit fec4856aff
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
24 changed files with 51 additions and 51 deletions

View file

@ -47,7 +47,7 @@ class LanguageSelection implements ILanguageSelection {
}
}
export class ModeServiceImpl extends Disposable implements ILanguageService {
export class LanguageService extends Disposable implements ILanguageService {
public _serviceBrand: undefined;
static instanceCount = 0;
@ -64,7 +64,7 @@ export class ModeServiceImpl extends Disposable implements ILanguageService {
constructor(warnOnOverwrite = false) {
super();
ModeServiceImpl.instanceCount++;
LanguageService.instanceCount++;
this._encounteredLanguages = new Set<string>();
this._registry = this._register(new LanguagesRegistry(true, warnOnOverwrite));
this.languageIdCodec = this._registry.languageIdCodec;
@ -72,7 +72,7 @@ export class ModeServiceImpl extends Disposable implements ILanguageService {
}
public override dispose(): void {
ModeServiceImpl.instanceCount--;
LanguageService.instanceCount--;
super.dispose();
}

View file

@ -9,7 +9,7 @@ import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService
import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService';
import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
import { ITextResourceConfigurationService, ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
@ -150,7 +150,7 @@ export module StaticServices {
export const markerService = define(IMarkerService, () => new MarkerService());
export const languageService = define(ILanguageService, (o) => new ModeServiceImpl());
export const languageService = define(ILanguageService, (o) => new LanguageService());
export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl());

View file

@ -11,7 +11,7 @@ import { Token } from 'vs/editor/common/core/token';
import { IState, LanguageId, MetadataConsts } from 'vs/editor/common/modes';
import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry';
import { TokenTheme } from 'vs/editor/common/modes/supports/tokenization';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ILineTokens, IToken, TokenizationSupport2Adapter, TokensProvider } from 'vs/editor/standalone/browser/standaloneLanguages';
import { IStandaloneTheme, IStandaloneThemeData, IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService';
import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry';
@ -113,7 +113,7 @@ suite('TokenizationSupport2Adapter', () => {
}
const disposables = new DisposableStore();
const languageService = disposables.add(new ModeServiceImpl());
const languageService = disposables.add(new LanguageService());
disposables.add(ModesRegistry.registerLanguage({ id: languageId }));
const adapter = new TokenizationSupport2Adapter(
languageId,

View file

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { MonarchTokenizer } from 'vs/editor/standalone/common/monarch/monarchLexer';
import { compile } from 'vs/editor/standalone/common/monarch/monarchCompile';
@ -31,7 +31,7 @@ suite('Monarch', () => {
}
test('Ensure @rematch and nextEmbedded can be used together in Monarch grammar', () => {
const languageService = new ModeServiceImpl();
const languageService = new LanguageService();
const innerModeRegistration = ModesRegistry.registerLanguage({
id: 'sql'
});
@ -110,7 +110,7 @@ suite('Monarch', () => {
});
test('microsoft/monaco-editor#1235: Empty Line Handling', () => {
const languageService = new ModeServiceImpl();
const languageService = new LanguageService();
const tokenizer = createMonarchTokenizer(languageService, 'test', {
tokenizer: {
root: [
@ -167,7 +167,7 @@ suite('Monarch', () => {
});
test('microsoft/monaco-editor#2265: Exit a state at end of line', () => {
const languageService = new ModeServiceImpl();
const languageService = new LanguageService();
const tokenizer = createMonarchTokenizer(languageService, 'test', {
includeLF: true,
tokenizer: {
@ -215,7 +215,7 @@ suite('Monarch', () => {
});
test('issue #115662: monarchCompile function need an extra option which can control replacement', () => {
const languageService = new ModeServiceImpl();
const languageService = new LanguageService();
const tokenizer1 = createMonarchTokenizer(languageService, 'test', {
ignoreCase: false,
@ -269,7 +269,7 @@ suite('Monarch', () => {
});
test('microsoft/monaco-editor#2424: Allow to target @@', () => {
const languageService = new ModeServiceImpl();
const languageService = new LanguageService();
const tokenizer = createMonarchTokenizer(languageService, 'test', {
ignoreCase: false,

View file

@ -16,7 +16,7 @@ import { ILanguageConfigurationService } from 'vs/editor/common/modes/languageCo
import { IModelService } from 'vs/editor/common/services/modelService';
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl';
import { TestCodeEditorService, TestCommandService } from 'vs/editor/test/browser/editorTestServices';
@ -182,7 +182,7 @@ export function createCodeEditorServices(disposables: DisposableStore, services:
define(INotificationService, TestNotificationService);
define(IDialogService, TestDialogService);
define(IUndoRedoService, UndoRedoService);
define(ILanguageService, ModeServiceImpl);
define(ILanguageService, LanguageService);
define(ILanguageConfigurationService, TestLanguageConfigurationService);
define(IConfigurationService, TestConfigurationService);
define(ITextResourcePropertiesService, TestTextResourcePropertiesService);

View file

@ -9,7 +9,7 @@ import { BracketPairColorizationOptions, DefaultEndOfLine, ITextBufferFactory, I
import { TextModel } from 'vs/editor/common/model/textModel';
import { ILanguageConfigurationService } from 'vs/editor/common/modes/languageConfigurationRegistry';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { TestLanguageConfigurationService } from 'vs/editor/test/common/modes/testLanguageConfigurationService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@ -94,7 +94,7 @@ export function createModelServices(disposables: DisposableStore, services: Serv
define(INotificationService, TestNotificationService);
define(IDialogService, TestDialogService);
define(IUndoRedoService, UndoRedoService);
define(ILanguageService, ModeServiceImpl);
define(ILanguageService, LanguageService);
define(ILanguageConfigurationService, TestLanguageConfigurationService);
define(IConfigurationService, TestConfigurationService);
define(ITextResourcePropertiesService, TestTextResourcePropertiesService);

View file

@ -25,7 +25,7 @@ import { DisposableStore } from 'vs/base/common/lifecycle';
import { DocumentSemanticTokensProvider, DocumentSemanticTokensProviderRegistry, SemanticTokens, SemanticTokensEdits, SemanticTokensLegend } from 'vs/editor/common/modes';
import { CancellationToken } from 'vs/base/common/cancellation';
import { Barrier, timeout } from 'vs/base/common/async';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ColorScheme } from 'vs/platform/theme/common/theme';
import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry';
import { IModelService } from 'vs/editor/common/services/modelService';
@ -53,7 +53,7 @@ suite('ModelService', () => {
new TestThemeService(),
new NullLogService(),
new UndoRedoService(dialogService, new TestNotificationService()),
disposables.add(new ModeServiceImpl()),
disposables.add(new LanguageService()),
new TestLanguageConfigurationService()
));
});
@ -425,10 +425,10 @@ suite('ModelSemanticColoring', () => {
themeService,
new NullLogService(),
new UndoRedoService(new TestDialogService(), new TestNotificationService()),
disposables.add(new ModeServiceImpl()),
disposables.add(new LanguageService()),
new TestLanguageConfigurationService()
));
languageService = disposables.add(new ModeServiceImpl(false));
languageService = disposables.add(new LanguageService(false));
});
teardown(() => {

View file

@ -5,7 +5,7 @@
import * as nls from 'vs/nls';
import { IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchModeService';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchLanguageService';
export enum CodeActionExtensionPointFields {
languages = 'languages',

View file

@ -5,7 +5,7 @@
import * as nls from 'vs/nls';
import { IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchModeService';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchLanguageService';
export enum DocumentationExtensionPointFields {
when = 'when',

View file

@ -7,7 +7,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
import * as nls from 'vs/nls';
import { CustomEditorPriority, CustomEditorSelector } from 'vs/workbench/contrib/customEditor/common/customEditor';
import { ExtensionsRegistry } from 'vs/workbench/services/extensions/common/extensionsRegistry';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchModeService';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchLanguageService';
namespace Fields {
export const viewType = 'viewType';

View file

@ -18,7 +18,7 @@ import { ILanguageConfigurationService } from 'vs/editor/common/modes/languageCo
import { IModelService } from 'vs/editor/common/services/modelService';
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
import { TestLanguageConfigurationService } from 'vs/editor/test/common/modes/testLanguageConfigurationService';
import { BrowserClipboardService } from 'vs/platform/clipboard/browser/clipboardService';
@ -158,7 +158,7 @@ export class NotebookEditorTestModel extends EditorModel implements INotebookEdi
export function setupInstantiationService(disposables = new DisposableStore()) {
const instantiationService = new TestInstantiationService();
instantiationService.stub(ILanguageService, disposables.add(new ModeServiceImpl()));
instantiationService.stub(ILanguageService, disposables.add(new LanguageService()));
instantiationService.stub(IUndoRedoService, instantiationService.createInstance(UndoRedoService));
instantiationService.stub(IConfigurationService, new TestConfigurationService());
instantiationService.stub(IThemeService, new TestThemeService());

View file

@ -21,7 +21,7 @@ import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/comm
import { ISnippetGetOptions, ISnippetsService } from 'vs/workbench/contrib/snippets/browser/snippets.contribution';
import { Snippet, SnippetFile, SnippetSource } from 'vs/workbench/contrib/snippets/browser/snippetsFile';
import { ExtensionsRegistry, IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchModeService';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchLanguageService';
import { SnippetCompletionProvider } from './snippetCompletionProvider';
import { IExtensionResourceLoaderService } from 'vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader';
import { ResourceMap } from 'vs/base/common/map';

View file

@ -7,7 +7,7 @@ import * as assert from 'assert';
import { SnippetCompletionProvider } from 'vs/workbench/contrib/snippets/browser/snippetCompletionProvider';
import { Position } from 'vs/editor/common/core/position';
import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { createTextModel } from 'vs/editor/test/common/editorTestUtils';
import { ISnippetsService } from 'vs/workbench/contrib/snippets/browser/snippets.contribution';
import { Snippet, SnippetSource } from 'vs/workbench/contrib/snippets/browser/snippetsFile';
@ -52,12 +52,12 @@ suite('SnippetsService', function () {
});
let disposables: DisposableStore;
let languageService: ModeServiceImpl;
let languageService: LanguageService;
let snippetService: ISnippetsService;
setup(function () {
disposables = new DisposableStore();
languageService = disposables.add(new ModeServiceImpl());
languageService = disposables.add(new LanguageService());
snippetService = new SimpleSnippetService([new Snippet(
['fooLang'],
'barTest',

View file

@ -9,7 +9,7 @@ import { KeyCode } from 'vs/base/common/keyCodes';
import { ChordKeybinding, SimpleKeybinding } from 'vs/base/common/keybindings';
import { OS } from 'vs/base/common/platform';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
@ -105,7 +105,7 @@ suite('KeybindingsEditing', () => {
instantiationService.stub(IEditorService, new TestEditorService());
instantiationService.stub(IWorkingCopyService, disposables.add(new WorkingCopyService()));
instantiationService.stub(ITelemetryService, NullTelemetryService);
instantiationService.stub(ILanguageService, ModeServiceImpl);
instantiationService.stub(ILanguageService, LanguageService);
instantiationService.stub(ILogService, new NullLogService());
instantiationService.stub(ILabelService, disposables.add(instantiationService.createInstance(LabelService)));
instantiationService.stub(IFilesConfigurationService, disposables.add(instantiationService.createInstance(FilesConfigurationService)));

View file

@ -9,7 +9,7 @@ import * as resources from 'vs/base/common/resources';
import { URI } from 'vs/base/common/uri';
import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry';
import { ILanguageExtensionPoint, ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { FILES_ASSOCIATIONS_CONFIG, IFilesConfiguration } from 'vs/platform/files/common/files';
@ -91,7 +91,7 @@ export const languagesExtPoint: IExtensionPoint<IRawLanguageExtensionPoint[]> =
}
});
export class WorkbenchModeServiceImpl extends ModeServiceImpl {
export class WorkbenchLanguageService extends LanguageService {
private _configurationService: IConfigurationService;
private _extensionService: IExtensionService;
@ -221,4 +221,4 @@ function isValidLanguageExtensionPoint(value: IRawLanguageExtensionPoint, collec
return true;
}
registerSingleton(ILanguageService, WorkbenchModeServiceImpl);
registerSingleton(ILanguageService, WorkbenchLanguageService);

View file

@ -5,7 +5,7 @@
import * as nls from 'vs/nls';
import { ExtensionsRegistry, IExtensionPoint } from 'vs/workbench/services/extensions/common/extensionsRegistry';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchModeService';
import { languagesExtPoint } from 'vs/workbench/services/mode/common/workbenchLanguageService';
export interface IEmbeddedLanguagesMap {
[scopeName: string]: string;

View file

@ -30,7 +30,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
import { TestLanguageConfigurationService } from 'vs/editor/test/common/modes/testLanguageConfigurationService';
import { TextModel } from 'vs/editor/common/model/textModel';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { DisposableStore } from 'vs/base/common/lifecycle';
suite('MainThreadDocumentsAndEditors', () => {
@ -67,7 +67,7 @@ suite('MainThreadDocumentsAndEditors', () => {
new TestThemeService(),
new NullLogService(),
undoRedoService,
disposables.add(new ModeServiceImpl()),
disposables.add(new LanguageService()),
new TestLanguageConfigurationService()
);
codeEditorService = new TestCodeEditorService();

View file

@ -54,7 +54,7 @@ import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecy
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
import { TestLanguageConfigurationService } from 'vs/editor/test/common/modes/testLanguageConfigurationService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
suite('MainThreadEditors', () => {
@ -88,7 +88,7 @@ suite('MainThreadEditors', () => {
new TestThemeService(),
new NullLogService(),
undoRedoService,
disposables.add(new ModeServiceImpl()),
disposables.add(new LanguageService()),
new TestLanguageConfigurationService()
);

View file

@ -9,7 +9,7 @@ import { URI } from 'vs/base/common/uri';
import { workbenchInstantiationService, TestEditorService } from 'vs/workbench/test/browser/workbenchTestServices';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { RangeHighlightDecorations } from 'vs/workbench/browser/codeeditor';
import { TextModel } from 'vs/editor/common/model/textModel';
import { createTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
@ -40,7 +40,7 @@ suite('Editor - Range decorations', () => {
disposables = new DisposableStore();
instantiationService = <TestInstantiationService>workbenchInstantiationService(undefined, disposables);
instantiationService.stub(IEditorService, new TestEditorService());
instantiationService.stub(ILanguageService, ModeServiceImpl);
instantiationService.stub(ILanguageService, LanguageService);
instantiationService.stub(IModelService, stubModelService(instantiationService));
text = 'LINE1' + '\n' + 'LINE2' + '\n' + 'LINE3' + '\n' + 'LINE4' + '\r\n' + 'LINE5';
model = aModel(URI.file('some_file'));

View file

@ -8,7 +8,7 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/
import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ILanguageService } from 'vs/editor/common/services/languageService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
@ -67,7 +67,7 @@ suite('EditorModel', () => {
setup(() => {
instantiationService = new TestInstantiationService();
languageService = instantiationService.stub(ILanguageService, ModeServiceImpl);
languageService = instantiationService.stub(ILanguageService, LanguageService);
});
test('basics', async () => {

View file

@ -25,7 +25,7 @@ import { ILifecycleService, ShutdownReason, StartupKind, LifecyclePhase, WillShu
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { FileOperationEvent, IFileService, IFileStat, IResolveFileResult, FileChangesEvent, IResolveFileOptions, ICreateFileOptions, IFileSystemProvider, FileSystemProviderCapabilities, IFileChange, IWatchOptions, IStat, FileType, FileDeleteOptions, FileOverwriteOptions, FileWriteOptions, FileOpenOptions, IFileStatWithMetadata, IResolveMetadataFileOptions, IWriteFileOptions, IReadFileOptions, IFileContent, IFileStreamContent, FileOperationError, IFileSystemProviderWithFileReadStreamCapability, FileReadStreamOptions, IReadFileStreamOptions, IFileSystemProviderCapabilitiesChangeEvent, IRawFileChangesEvent } from 'vs/platform/files/common/files';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
import { IResourceEncoding, ITextFileService, IReadTextFileOptions, ITextFileStreamContent, IWriteTextFileOptions, ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles';
import { ILanguageService } from 'vs/editor/common/services/languageService';
@ -230,7 +230,7 @@ export function workbenchInstantiationService(
const accessibilityService = new TestAccessibilityService();
instantiationService.stub(IAccessibilityService, accessibilityService);
instantiationService.stub(IFileDialogService, instantiationService.createInstance(TestFileDialogService));
instantiationService.stub(ILanguageService, disposables.add(instantiationService.createInstance(ModeServiceImpl)));
instantiationService.stub(ILanguageService, disposables.add(instantiationService.createInstance(LanguageService)));
instantiationService.stub(IHistoryService, new TestHistoryService());
instantiationService.stub(ITextResourcePropertiesService, new TestTextResourcePropertiesService(configService));
instantiationService.stub(IUndoRedoService, instantiationService.createInstance(UndoRedoService));

View file

@ -5,7 +5,7 @@
import * as assert from 'assert';
import { LanguagesRegistry } from 'vs/editor/common/services/languagesRegistry';
// import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
// import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
/**
* This function is called before test running and also again at the end of test running
@ -14,6 +14,6 @@ import { LanguagesRegistry } from 'vs/editor/common/services/languagesRegistry';
export function assertCleanState(): void {
// If this test fails, it is a clear indication that
// your test or suite is leaking services (e.g. via leaking text models)
// assert.strictEqual(ModeServiceImpl.instanceCount, 0, 'No leaking ILanguageService');
// assert.strictEqual(LanguageService.instanceCount, 0, 'No leaking ILanguageService');
assert.strictEqual(LanguagesRegistry.instanceCount, 0, 'No leaking LanguagesRegistry');
}

View file

@ -11,7 +11,7 @@ import * as path from 'vs/base/common/path';
import { URI } from 'vs/base/common/uri';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl';
import { LanguageService } from 'vs/editor/common/services/languageServiceImpl';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { TestLanguageConfigurationService } from 'vs/editor/test/common/modes/testLanguageConfigurationService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@ -86,7 +86,7 @@ suite.skip('TextSearch performance (integration)', () => {
new TestThemeService(),
logService,
undoRedoService,
new ModeServiceImpl(),
new LanguageService(),
new TestLanguageConfigurationService()
),
],

View file

@ -69,7 +69,7 @@ import 'vs/workbench/services/keybinding/browser/keybindingService';
import 'vs/workbench/services/untitled/common/untitledTextEditorService';
import 'vs/workbench/services/textresourceProperties/common/textResourcePropertiesService';
import 'vs/workbench/services/textfile/common/textEditorService';
import 'vs/workbench/services/mode/common/workbenchModeService';
import 'vs/workbench/services/mode/common/workbenchLanguageService';
import 'vs/workbench/services/model/common/workbenchModelService';
import 'vs/workbench/services/commands/common/commandService';
import 'vs/workbench/services/themes/browser/workbenchThemeService';