Merge from vscode 966b87dd4013be1a9c06e2b8334522ec61905cc2 (#4696)

This commit is contained in:
Anthony Dresser
2019-03-26 11:43:38 -07:00
committed by GitHub
parent b1393ae615
commit 0d8ef9583b
268 changed files with 5947 additions and 3422 deletions

View File

@@ -24,7 +24,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { memoize } from 'vs/base/common/decorators';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { DebugToolbar } from 'vs/workbench/contrib/debug/browser/debugToolbar';
import { DebugToolBar } from 'vs/workbench/contrib/debug/browser/debugToolBar';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet';
import { IMenu, MenuId, IMenuService, MenuItemAction } from 'vs/platform/actions/common/actions';
@@ -40,7 +40,7 @@ export class DebugViewlet extends ViewContainerViewlet {
private progressRunner: IProgressRunner;
private breakpointView: ViewletPanel;
private panelListeners = new Map<string, IDisposable>();
private debugToolbarMenu: IMenu;
private debugToolBarMenu: IMenu;
constructor(
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@@ -63,6 +63,7 @@ export class DebugViewlet extends ViewContainerViewlet {
super(VIEWLET_ID, `${VIEWLET_ID}.state`, false, configurationService, layoutService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService);
this._register(this.debugService.onDidChangeState(state => this.onDebugServiceStateChange(state)));
this._register(this.debugService.onDidNewSession(() => this.updateToolBar()));
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateTitleArea()));
this._register(this.configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration('debug.toolBarLocation')) {
@@ -109,11 +110,11 @@ export class DebugViewlet extends ViewContainerViewlet {
return [this.startAction, this.configureAction, this.toggleReplAction];
}
if (!this.debugToolbarMenu) {
this.debugToolbarMenu = this.menuService.createMenu(MenuId.DebugToolbar, this.contextKeyService);
this.toDispose.push(this.debugToolbarMenu);
if (!this.debugToolBarMenu) {
this.debugToolBarMenu = this.menuService.createMenu(MenuId.DebugToolBar, this.contextKeyService);
this.toDispose.push(this.debugToolBarMenu);
}
return DebugToolbar.getActions(this.debugToolbarMenu, this.debugService, this.instantiationService);
return DebugToolBar.getActions(this.debugToolBarMenu, this.debugService, this.instantiationService);
}
get showInitialDebugActions(): boolean {
@@ -160,6 +161,10 @@ export class DebugViewlet extends ViewContainerViewlet {
this.progressRunner = this.progressService.show(true);
}
this.updateToolBar();
}
private updateToolBar(): void {
if (this.configurationService.getValue<IDebugConfiguration>('debug').toolBarLocation === 'docked') {
this.updateTitleArea();
}