Skip to content

Commit

Permalink
fixes #50787
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed May 30, 2018
1 parent e69da50 commit 06fdd10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
return this.hide();
}

const actions = DebugActionsWidget.getActions(this.allActions, this.toUnbind, false, this.debugService, this.keybindingService, this.instantiationService);
const actions = DebugActionsWidget.getActions(this.allActions, this.toUnbind, this.debugService, this.keybindingService, this.instantiationService);
if (!arrays.equals(actions, this.activeActions, (first, second) => first.id === second.id)) {
this.actionBar.clear();
this.actionBar.push(actions, { icon: true, label: false });
Expand Down Expand Up @@ -242,7 +242,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
this.$el.hide();
}

public static getActions(allActions: AbstractDebugAction[], toUnbind: IDisposable[], ignoreFocusSessionAction: boolean, debugService: IDebugService, keybindingService: IKeybindingService, instantiationService: IInstantiationService): AbstractDebugAction[] {
public static getActions(allActions: AbstractDebugAction[], toUnbind: IDisposable[], debugService: IDebugService, keybindingService: IKeybindingService, instantiationService: IInstantiationService): AbstractDebugAction[] {
if (allActions.length === 0) {
allActions.push(new ContinueAction(ContinueAction.ID, ContinueAction.LABEL, debugService, keybindingService));
allActions.push(new PauseAction(PauseAction.ID, PauseAction.LABEL, debugService, keybindingService));
Expand All @@ -254,9 +254,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
allActions.push(instantiationService.createInstance(RestartAction, RestartAction.ID, RestartAction.LABEL));
allActions.push(new StepBackAction(StepBackAction.ID, StepBackAction.LABEL, debugService, keybindingService));
allActions.push(new ReverseContinueAction(ReverseContinueAction.ID, ReverseContinueAction.LABEL, debugService, keybindingService));
if (!ignoreFocusSessionAction) {
allActions.push(instantiationService.createInstance(FocusSessionAction, FocusSessionAction.ID, FocusSessionAction.LABEL));
}
allActions.push(instantiationService.createInstance(FocusSessionAction, FocusSessionAction.ID, FocusSessionAction.LABEL));
allActions.forEach(a => {
toUnbind.push(a);
});
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/debug/browser/debugViewlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class DebugViewlet extends PersistentViewsViewlet {
return [this.startAction, this.configureAction, this.toggleReplAction];
}

return DebugActionsWidget.getActions(this.allActions, this.toUnbind, true, this.debugService, this.keybindingService, this.instantiationService);
return DebugActionsWidget.getActions(this.allActions, this.toUnbind, this.debugService, this.keybindingService, this.instantiationService);
}

public get showInitialDebugActions(): boolean {
Expand Down

0 comments on commit 06fdd10

Please sign in to comment.