Skip to content

Commit 1c6efa6

Browse files
authored
Merge branch 'master' into joh/es6
2 parents 27bc032 + e2cca74 commit 1c6efa6

53 files changed

Lines changed: 473 additions & 396 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/bootstrap-window.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ exports.load = function (modulePaths, resultCallback, options) {
3131

3232
const args = parseURLQueryArgs();
3333
/**
34-
* // configuration: IWindowConfiguration
34+
* // configuration: INativeWindowConfiguration
3535
* @type {{
3636
* zoomLevel?: number,
3737
* extensionDevelopmentPath?: string[],

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function configureCommandlineSwitchesSync(cliArgs) {
175175
app.commandLine.appendSwitch('js-flags', jsFlags);
176176
}
177177

178-
// TODO@Ben TODO@Deepak Electron 7 workaround for https://github.com/microsoft/vscode/issues/88873
178+
// TODO@Deepak Electron 7 workaround for https://github.com/microsoft/vscode/issues/88873
179179
app.commandLine.appendSwitch('disable-features', 'LayoutNG');
180180

181181
return argvConfig;

src/vs/base/test/node/glob.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,7 @@ suite('Glob', () => {
239239
assertGlobMatch(p, 'some/folder/project.json');
240240
assertNoGlobMatch(p, 'some/folder/file_project.json');
241241
assertNoGlobMatch(p, 'some/folder/fileproject.json');
242-
// assertNoGlobMatch(p, '/rrproject.json'); TODO@ben this still fails if T1-3 are disabled
243242
assertNoGlobMatch(p, 'some/rrproject.json');
244-
// assertNoGlobMatch(p, 'rrproject.json');
245-
// assertNoGlobMatch(p, '\\rrproject.json');
246243
assertNoGlobMatch(p, 'some\\rrproject.json');
247244

248245
p = 'test/**';

src/vs/code/electron-browser/issue/issueReporterMain.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { ITelemetryServiceConfig, TelemetryService } from 'vs/platform/telemetry
3939
import { combinedAppender, LogAppender, NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
4040
import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProperties';
4141
import { TelemetryAppenderClient } from 'vs/platform/telemetry/node/telemetryIpc';
42-
import { IWindowConfiguration } from 'vs/platform/windows/common/windows';
42+
import { INativeWindowConfiguration } from 'vs/platform/windows/node/window';
4343

4444
const MAX_URL_LENGTH = 2045;
4545

@@ -49,7 +49,7 @@ interface SearchResult {
4949
state?: string;
5050
}
5151

52-
export interface IssueReporterConfiguration extends IWindowConfiguration {
52+
export interface IssueReporterConfiguration extends INativeWindowConfiguration {
5353
data: IssueReporterData;
5454
features: IssueReporterFeatures;
5555
}
@@ -316,7 +316,7 @@ export class IssueReporter extends Disposable {
316316
}
317317
}
318318

319-
private initServices(configuration: IWindowConfiguration): void {
319+
private initServices(configuration: INativeWindowConfiguration): void {
320320
const serviceCollection = new ServiceCollection();
321321
const mainProcessService = new MainProcessService(configuration.windowId);
322322
serviceCollection.set(IMainProcessService, mainProcessService);

src/vs/code/electron-main/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class CodeApplication extends Disposable {
133133
//
134134
// !!! DO NOT CHANGE without consulting the documentation !!!
135135
//
136-
// app.on('remote-get-guest-web-contents', event => event.preventDefault()); // TODO@Ben TODO@Matt revisit this need for <webview>
136+
// app.on('remote-get-guest-web-contents', event => event.preventDefault()); // TODO@Matt revisit this need for <webview>
137137
app.on('remote-require', (event, sender, module) => {
138138
this.logService.trace('App#on(remote-require): prevented');
139139

src/vs/code/electron-main/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class CodeMain {
276276
// Skip this if we are running with --wait where it is expected that we wait for a while.
277277
// Also skip when gathering diagnostics (--status) which can take a longer time.
278278
let startupWarningDialogHandle: NodeJS.Timeout | undefined = undefined;
279-
if (!environmentService.wait && !environmentService.status) {
279+
if (!environmentService.args.wait && !environmentService.args.status) {
280280
startupWarningDialogHandle = setTimeout(() => {
281281
this.showStartupWarningDialog(
282282
localize('secondInstanceNoResponse', "Another instance of {0} is running but not responding", product.nameShort),

src/vs/code/electron-main/window.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ import { ILogService } from 'vs/platform/log/common/log';
1414
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
1515
import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv';
1616
import product from 'vs/platform/product/common/product';
17-
import { IWindowSettings, MenuBarVisibility, IWindowConfiguration, ReadyState, getTitleBarStyle, getMenuBarVisibility } from 'vs/platform/windows/common/windows';
17+
import { IWindowSettings, MenuBarVisibility, ReadyState, getTitleBarStyle, getMenuBarVisibility } from 'vs/platform/windows/common/windows';
1818
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
1919
import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform';
2020
import { ICodeWindow, IWindowState, WindowMode } from 'vs/platform/windows/electron-main/windows';
21+
import { INativeWindowConfiguration } from 'vs/platform/windows/node/window';
2122
import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
2223
import { IWorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService';
2324
import { IBackupMainService } from 'vs/platform/backup/electron-main/backup';
@@ -85,7 +86,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
8586

8687
private readonly whenReadyCallbacks: { (window: ICodeWindow): void }[];
8788

88-
private pendingLoadConfig?: IWindowConfiguration;
89+
private pendingLoadConfig?: INativeWindowConfiguration;
8990

9091
private marketplaceHeadersPromise: Promise<object>;
9192

@@ -231,8 +232,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
231232
this.registerListeners();
232233
}
233234

234-
private currentConfig: IWindowConfiguration | undefined;
235-
get config(): IWindowConfiguration | undefined { return this.currentConfig; }
235+
private currentConfig: INativeWindowConfiguration | undefined;
236+
get config(): INativeWindowConfiguration | undefined { return this.currentConfig; }
236237

237238
private _id: number;
238239
get id(): number { return this._id; }
@@ -552,7 +553,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
552553
}
553554
}
554555

555-
load(config: IWindowConfiguration, isReload?: boolean, disableExtensions?: boolean): void {
556+
load(config: INativeWindowConfiguration, isReload?: boolean, disableExtensions?: boolean): void {
556557

557558
// If this is the first time the window is loaded, we associate the paths
558559
// directly with the window because we assume the loading will just work
@@ -612,7 +613,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
612613
this._onLoad.fire();
613614
}
614615

615-
reload(configurationIn?: IWindowConfiguration, cli?: ParsedArgs): void {
616+
reload(configurationIn?: INativeWindowConfiguration, cli?: ParsedArgs): void {
616617

617618
// If config is not provided, copy our current one
618619
const configuration = configurationIn ? configurationIn : objects.mixin({}, this.currentConfig);
@@ -639,7 +640,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
639640
this.load(configuration, true, disableExtensions);
640641
}
641642

642-
private getUrl(windowConfiguration: IWindowConfiguration): string {
643+
private getUrl(windowConfiguration: INativeWindowConfiguration): string {
643644

644645
// Set window ID
645646
windowConfiguration.windowId = this._win.id;

src/vs/editor/common/config/editorOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ export class EditorFontLigatures extends BaseEditorOption<EditorOption.fontLigat
13321332
description: nls.localize('fontFeatureSettings', "Explicit font-feature-settings.")
13331333
}
13341334
],
1335-
description: nls.localize('fontLigaturesGeneral', "Configures font ligatures."),
1335+
description: nls.localize('fontLigaturesGeneral', "Configures font ligatures or font features."),
13361336
default: false
13371337
}
13381338
);

src/vs/editor/common/modes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,7 @@ export interface SemanticTokensEdits {
15891589
}
15901590

15911591
export interface DocumentSemanticTokensProvider {
1592+
onDidChange?: Event<void>;
15921593
getLegend(): SemanticTokensLegend;
15931594
provideDocumentSemanticTokens(model: model.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;
15941595
releaseDocumentSemanticTokens(resultId: string | undefined): void;

src/vs/editor/common/services/modelServiceImpl.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { Emitter, Event } from 'vs/base/common/event';
7-
import { Disposable, IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
7+
import { Disposable, IDisposable, DisposableStore, dispose } from 'vs/base/common/lifecycle';
88
import * as platform from 'vs/base/common/platform';
99
import * as errors from 'vs/base/common/errors';
1010
import { URI } from 'vs/base/common/uri';
@@ -724,6 +724,7 @@ class ModelSemanticColoring extends Disposable {
724724
private readonly _fetchSemanticTokens: RunOnceScheduler;
725725
private _currentResponse: SemanticTokensResponse | null;
726726
private _currentRequestCancellationTokenSource: CancellationTokenSource | null;
727+
private _providersChangeListeners: IDisposable[];
727728

728729
constructor(model: ITextModel, themeService: IThemeService, stylingProvider: SemanticStyling) {
729730
super();
@@ -734,13 +735,28 @@ class ModelSemanticColoring extends Disposable {
734735
this._fetchSemanticTokens = this._register(new RunOnceScheduler(() => this._fetchSemanticTokensNow(), 300));
735736
this._currentResponse = null;
736737
this._currentRequestCancellationTokenSource = null;
738+
this._providersChangeListeners = [];
737739

738740
this._register(this._model.onDidChangeContent(e => {
739741
if (!this._fetchSemanticTokens.isScheduled()) {
740742
this._fetchSemanticTokens.schedule();
741743
}
742744
}));
743-
this._register(DocumentSemanticTokensProviderRegistry.onDidChange(e => this._fetchSemanticTokens.schedule()));
745+
const bindChangeListeners = () => {
746+
dispose(this._providersChangeListeners);
747+
this._providersChangeListeners = [];
748+
for (const provider of DocumentSemanticTokensProviderRegistry.all(model)) {
749+
if (typeof provider.onDidChange === 'function') {
750+
this._providersChangeListeners.push(provider.onDidChange(() => this._fetchSemanticTokens.schedule(0)));
751+
}
752+
}
753+
};
754+
bindChangeListeners();
755+
this._register(DocumentSemanticTokensProviderRegistry.onDidChange(e => {
756+
bindChangeListeners();
757+
this._fetchSemanticTokens.schedule();
758+
}));
759+
744760
if (themeService) {
745761
// workaround for tests which use undefined... :/
746762
this._register(themeService.onThemeChange(_ => {

0 commit comments

Comments
 (0)