src/vs/editor/test/common/modesTestUtils.ts

35 LOC · 35 covered · 0 uncovered · 4 ranges · 21 concepts · 3 introducers · 15 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filesrc/vs/editor/common/languages/supports.ts · 100 LOClanguages/supports.tselectricCharacter.ts ×4 · 37 introduced LOCelectricCharacter.ts ×4electricCharacter.ts ×1 · 13 introduced LOCelectricCharacter.ts ×1richEditBrackets.ts ×17 · 177 introduced LOCrichEditBrackets.ts ×17characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 2|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 3|occurrence=1 · 0 introduced LOCcharacterPair.test|title…supports.ts ×1 · 2 introduced LOCsupports.ts ×1characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 1|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in not interesting line 1|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in empty line|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in not interesting line 2|occurrence=1 · 0 introduced LOCcharacterPair.test|title…languageConfiguration.ts ×2 · 9 introduced LOClanguageConfiguration.ts…modesTestUtils.ts ×1 · 11 introduced LOCmodesTestUtils.ts ×1supports.ts ×6 · 46 introduced LOCsupports.ts ×6characterPair.test|title=CharacterPairSupport only brackets|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport only autoClosingPairs|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport only empty brackets|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport only surroundingPairs|occurrence=1, characterPair.test|title=CharacterPairSupport only empty surroundingPairs|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.test|title=CharacterPairSupport only empty autoClosingPairs|occurrence=1, characterPair.test|title=CharacterPairSupport brackets is ignored when having autoClosingPairs|occurrence=1 · 0 introduced LOCcharacterPair.test|title…characterPair.ts ×1 · 2 introduced LOCcharacterPair.ts ×1characterPair.ts ×1 · 2 introduced LOCcharacterPair.ts ×1modesTestUtils.ts ×1 · 16 introduced LOCmodesTestUtils.ts ×1characterPair.test|title=CharacterPairSupport brackets is ignored when having autoClosingPairs|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport brackets is ignored when having autoClosingPairs|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport only autoClosingPairs|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport only autoClosingPairs|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport only brackets|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport only brackets|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport only empty autoClosingPairs|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport only empty autoClosingPairs|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport only empty brackets|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport only empty brackets|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport only empty surroundingPairs|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport only empty surroundingPairs|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport only surroundingPairs|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport only surroundingPairs|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in empty line|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport shouldAutoClosePair in empty line|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 1|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 1|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 2|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 2|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 3|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport shouldAutoClosePair in interesting line 3|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in not interesting line 1|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport shouldAutoClosePair in not interesting line 1|occurrence=1characterPair.test|title…characterPair.test|title=CharacterPairSupport shouldAutoClosePair in not interesting line 2|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/characterPair.test|title=CharacterPairSupport shouldAutoClosePair in not interesting line 2|occurrence=1characterPair.test|title…electricCharacter.test|title=Editor Modes - Auto Indentation getElectricCharacters uses all sources and dedups|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/electricCharacter.test|title=Editor Modes - Auto Indentation getElectricCharacters uses all sources and dedups|occurrence=1electricCharacter.test|t…electricCharacter.test|title=Editor Modes - Auto Indentation matchOpenBracket|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/modes/supports/electricCharacter.test|title=Editor Modes - Auto Indentation matchOpenBracket|occurrence=1electricCharacter.test|t…Focused file · src/vs/editor/test/common/modesTestUtils.ts · 35 LOCcommon/modesTestUtils.ts

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 > /*--------------------------------------------------------------------------------------------- modesTestUtils.ts ×1
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { LineTokens } from '../../common/tokens/lineTokens.js';
7 > import { StandardTokenType, MetadataConsts } from '../../common/encodedTokenAttributes.js';
8 > import { ScopedLineTokens, createScopedLineTokens } from '../../common/languages/supports.js';
9 > import { LanguageIdCodec } from '../../common/services/languagesRegistry.js';
10 >
11 > export interface TokenText {
12 > text: string;
13 > type: StandardTokenType;
14 > }
15 >
16 > export function createFakeScopedLineTokens(rawTokens: TokenText[]): ScopedLineTokens {
17 > const tokens = new Uint32Array(rawTokens.length << 1); supports.ts ×6
18 > let line = '';
19 >
20 > for (let i = 0, len = rawTokens.length; i < len; i++) {
21 > const rawToken = rawTokens[i]; modesTestUtils.ts ×1
22 >
23 > const startOffset = line.length;
24 > const metadata = (
25 > (rawToken.type << MetadataConsts.TOKEN_TYPE_OFFSET)
26 > ) >>> 0;
27 >
28 > tokens[(i << 1)] = startOffset;
29 > tokens[(i << 1) + 1] = metadata;
30 > line += rawToken.text;
31 > }
33 > LineTokens.convertToEndOffset(tokens, line.length);
34 > return createScopedLineTokens(new LineTokens(tokens, line, new LanguageIdCodec()), 0);
35 > }