Skip to content

Commit

Permalink
polish debug.toolBarLocation
Browse files Browse the repository at this point in the history
fixes #50786
  • Loading branch information
isidorn committed May 30, 2018
1 parent 169f625 commit 98d069d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
this.updateScheduler = new RunOnceScheduler(() => {
const state = this.debugService.state;
if (state === State.Inactive || this.configurationService.getValue<IDebugConfiguration>('debug').hideActionBar
|| this.configurationService.getValue<IDebugConfiguration>('debug').toolbar !== 'float') {
|| this.configurationService.getValue<IDebugConfiguration>('debug').toolBarLocation !== 'floating') {
return this.hide();
}

Expand Down Expand Up @@ -218,7 +218,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
}

private onDidConfigurationChange(event: IConfigurationChangeEvent): void {
if (event.affectsConfiguration('debug.hideActionBar') || event.affectsConfiguration('debug.toolbar')) {
if (event.affectsConfiguration('debug.hideActionBar') || event.affectsConfiguration('debug.toolBarLocation')) {
this.updateScheduler.schedule();
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/parts/debug/browser/debugViewlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class DebugViewlet extends PersistentViewsViewlet {
this._register(this.debugService.onDidChangeState(state => this.onDebugServiceStateChange(state)));
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateTitleArea()));
this._register(this.configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration('debug.toolbar')) {
if (e.affectsConfiguration('debug.toolBarLocation')) {
this.updateTitleArea();
}
}));
Expand Down Expand Up @@ -112,7 +112,7 @@ export class DebugViewlet extends PersistentViewsViewlet {

public get showInitialDebugActions(): boolean {
const state = this.debugService.state;
return state === State.Inactive || this.configurationService.getValue<IDebugConfiguration>('debug').toolbar !== 'dock';
return state === State.Inactive || this.configurationService.getValue<IDebugConfiguration>('debug').toolBarLocation !== 'docked';
}

public getSecondaryActions(): IAction[] {
Expand Down Expand Up @@ -153,7 +153,7 @@ export class DebugViewlet extends PersistentViewsViewlet {
this.progressRunner = null;
}

if (this.configurationService.getValue<IDebugConfiguration>('debug').toolbar === 'dock') {
if (this.configurationService.getValue<IDebugConfiguration>('debug').toolBarLocation === 'docked') {
this.updateTitleArea();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/debug/common/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export interface IDebugConfiguration {
openExplorerOnEnd: boolean;
inlineValues: boolean;
hideActionBar: boolean;
toolbar: 'float' | 'dock' | 'hide';
toolBarLocation: 'floating' | 'docked' | 'hidden';
showInStatusBar: 'never' | 'always' | 'onFirstSessionStart';
internalConsoleOptions: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart';
extensionHostDebugAdapter: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,10 @@ configurationRegistry.registerConfiguration({
description: nls.localize({ comment: ['This is the description for a setting'], key: 'inlineValues' }, "Show variable values inline in editor while debugging"),
default: false
},
'debug.hideActionBar': {
type: 'boolean',
description: nls.localize({ comment: ['This is the description for a setting'], key: 'hideActionBar' }, "Controls if the floating debug action bar should be hidden"),
default: false
},
'debug.toolbar': {
enum: ['float', 'dock', 'hide'],
description: nls.localize({ comment: ['This is the description for a setting'], key: 'toolbar' }, "Controls the debug toolbar. Should it be floating, docked in the debug view or hidden."),
default: 'float'
'debug.toolBarLocation': {
enum: ['floating', 'docked', 'hidden'],
description: nls.localize({ comment: ['This is the description for a setting'], key: 'toolBarLocation' }, "Controls the location of the debug toolbar. Either \"floating\" in all views, \"docked\" in the debug view, or \"hidden\""),
default: 'floating'
},
'debug.showInStatusBar': {
enum: ['never', 'always', 'onFirstSessionStart'],
Expand Down

0 comments on commit 98d069d

Please sign in to comment.