Skip to content

Commit b351673

Browse files
committed
TokenTypes & TokenModifiers
1 parent a5ab405 commit b351673

9 files changed

Lines changed: 465 additions & 435 deletions

File tree

src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
1414
import { Registry } from 'vs/platform/registry/common/platform';
1515
import { ColorIdentifier, Extensions, IColorRegistry } from 'vs/platform/theme/common/colorRegistry';
1616
import { Extensions as ThemingExtensions, ICssStyleCollector, IIconTheme, IThemingRegistry } from 'vs/platform/theme/common/themeService';
17-
import { TokenStyle, TokenStyleIdentifier } from 'vs/platform/theme/common/tokenStyleRegistry';
17+
import { TokenStyle, TokenClassification, ProbeScope } from 'vs/platform/theme/common/tokenClassificationRegistry';
1818

1919
const VS_THEME_NAME = 'vs';
2020
const VS_DARK_THEME_NAME = 'vs-dark';
@@ -131,7 +131,11 @@ class StandaloneTheme implements IStandaloneTheme {
131131
return this._tokenTheme;
132132
}
133133

134-
getTokenStyle(tokenStyle: TokenStyleIdentifier, useDefault?: boolean | undefined): TokenStyle | undefined {
134+
getTokenStyle(classification: TokenClassification, useDefault?: boolean | undefined): TokenStyle | undefined {
135+
return undefined;
136+
}
137+
138+
resolveScopes(scopes: ProbeScope[]): TokenStyle | undefined {
135139
return undefined;
136140
}
137141
}

src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { ILineTokens, IToken, TokenizationSupport2Adapter, TokensProvider } from
1313
import { IStandaloneTheme, IStandaloneThemeData, IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService';
1414
import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry';
1515
import { IIconTheme, ITheme, LIGHT } from 'vs/platform/theme/common/themeService';
16-
import { TokenStyleIdentifier } from 'vs/platform/theme/common/tokenStyleRegistry';
1716

1817
suite('TokenizationSupport2Adapter', () => {
1918

@@ -57,7 +56,9 @@ suite('TokenizationSupport2Adapter', () => {
5756
throw new Error('Not implemented');
5857
},
5958

60-
getTokenStyle: (tokenStyleId: TokenStyleIdentifier) => undefined
59+
getTokenStyle: () => undefined,
60+
61+
6162
};
6263
}
6364
public getIconTheme(): IIconTheme {

src/vs/platform/theme/common/themeService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as platform from 'vs/platform/registry/common/platform';
1010
import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry';
1111
import { Event, Emitter } from 'vs/base/common/event';
1212
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
13-
import { TokenStyleIdentifier, TokenStyle } from 'vs/platform/theme/common/tokenStyleRegistry';
13+
import { TokenStyle, TokenClassification, ProbeScope } from 'vs/platform/theme/common/tokenClassificationRegistry';
1414

1515
export const IThemeService = createDecorator<IThemeService>('themeService');
1616

@@ -61,7 +61,9 @@ export interface ITheme {
6161
*/
6262
defines(color: ColorIdentifier): boolean;
6363

64-
getTokenStyle(color: TokenStyleIdentifier, useDefault?: boolean): TokenStyle | undefined;
64+
getTokenStyle(classification: TokenClassification, useDefault?: boolean): TokenStyle | undefined;
65+
66+
resolveScopes(scopes: ProbeScope[]): TokenStyle | undefined;
6567
}
6668

6769
export interface IIconTheme {

0 commit comments

Comments
 (0)