Merge from vscode 3bd60b2ba753e7fe39b42f99184bc6c5881d3551 (#4712)

This commit is contained in:
Anthony Dresser
2019-03-27 11:36:01 -07:00
committed by GitHub
parent eac3420583
commit 46b7afe558
36 changed files with 303 additions and 137 deletions

View File

@@ -21,7 +21,7 @@ export class DebugStatus extends Themable implements IStatusbarItem {
private statusBarItem: HTMLElement;
private label: HTMLElement;
private icon: HTMLElement;
private showInStatusBar: string;
private showInStatusBar: 'never' | 'always' | 'onFirstSessionStart';
constructor(
@IQuickOpenService private readonly quickOpenService: IQuickOpenService,
@@ -36,6 +36,10 @@ export class DebugStatus extends Themable implements IStatusbarItem {
this._register(this.debugService.onDidChangeState(state => {
if (state !== State.Inactive && this.showInStatusBar === 'onFirstSessionStart') {
this.doRender();
} else {
if (this.showInStatusBar !== 'never') {
this.updateStyles();
}
}
}));
this.showInStatusBar = configurationService.getValue<IDebugConfiguration>('debug').showInStatusBar;
@@ -53,7 +57,6 @@ export class DebugStatus extends Themable implements IStatusbarItem {
}
protected updateStyles(): void {
super.updateStyles();
if (this.icon) {
if (isStatusbarInDebugMode(this.debugService)) {
this.icon.style.backgroundColor = this.getColor(STATUS_BAR_DEBUGGING_FOREGROUND);

View File

@@ -11,7 +11,7 @@ import { isObject } from 'vs/base/common/types';
import { TelemetryAppenderClient } from 'vs/platform/telemetry/node/telemetryIpc';
import { IJSONSchema, IJSONSchemaSnippet } from 'vs/base/common/jsonSchema';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { IConfig, IDebuggerContribution, IDebugAdapterExecutable, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, ITerminalSettings, IDebugger, IDebugSession, IAdapterDescriptor, IDebugAdapterServer } from 'vs/workbench/contrib/debug/common/debug';
import { IConfig, IDebuggerContribution, IDebugAdapterExecutable, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, ITerminalSettings, IDebugger, IDebugSession, IAdapterDescriptor, IDebugAdapterServer, IDebugConfiguration } from 'vs/workbench/contrib/debug/common/debug';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IOutputService } from 'vs/workbench/contrib/output/common/output';
@@ -187,8 +187,11 @@ export class Debugger implements IDebugger {
}
private inExtHost(): boolean {
/*
const debugConfigs = this.configurationService.getValue<IDebugConfiguration>('debug');
if (typeof debugConfigs.extensionHostDebugAdapter === 'boolean') {
return debugConfigs.extensionHostDebugAdapter;
}
/*
return !!debugConfigs.extensionHostDebugAdapter
|| this.configurationManager.needsToRunInExtHost(this.type)
|| (!!this.mainExtensionDescription && this.mainExtensionDescription.extensionLocation.scheme !== 'file');