blob: 4ad2a686fbb642d8ac7e85d8478da32c31cf2926 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Event } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
import { ModesRegistry } from 'vs/editor/common/languages/modesRegistry';
import { ILanguageSelection } from 'vs/editor/common/languages/language';
export class MockMode extends Disposable {
constructor(
public readonly languageId: string
) {
super();
this._register(ModesRegistry.registerLanguage({ id: languageId }));
}
}
export class StaticLanguageSelector implements ILanguageSelection {
readonly onDidChange: Event<string> = Event.None;
constructor(public readonly languageId: string) { }
}
|