Skip to content

Commit

Permalink
Revert "fixes #107860"
Browse files Browse the repository at this point in the history
This reverts commit b8e87aa.
  • Loading branch information
roblourens committed Oct 6, 2020
1 parent b0231fd commit c64a4f0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ export class StartDebugActionViewItem implements IActionViewItem {
export class FocusSessionActionViewItem extends SelectActionViewItem {
constructor(
action: IAction,
session: IDebugSession | undefined,
@IDebugService protected readonly debugService: IDebugService,
@IThemeService themeService: IThemeService,
@IContextViewService contextViewService: IContextViewService,
Expand Down Expand Up @@ -263,17 +262,15 @@ export class FocusSessionActionViewItem extends SelectActionViewItem {
});
this._register(this.debugService.onDidEndSession(() => this.update()));

this.update(session);
this.update();
}

protected getActionContext(_: string, index: number): any {
return this.getSessions()[index];
}

private update(session?: IDebugSession) {
if (!session) {
session = this.getSelectedSession();
}
private update() {
const session = this.getSelectedSession();
const sessions = this.getSessions();
const names = sessions.map(s => {
const label = s.getLabel();
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/debugToolBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
orientation: ActionsOrientation.HORIZONTAL,
actionViewItemProvider: (action: IAction) => {
if (action.id === FocusSessionAction.ID) {
return this.instantiationService.createInstance(FocusSessionActionViewItem, action, undefined);
return this.instantiationService.createInstance(FocusSessionActionViewItem, action);
} else if (action instanceof MenuItemAction) {
return this.instantiationService.createInstance(MenuEntryActionViewItem, action);
} else if (action instanceof SubmenuItemAction) {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/debugViewlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class DebugViewPaneContainer extends ViewPaneContainer {
return this.startDebugActionViewItem;
}
if (action.id === FocusSessionAction.ID) {
return new FocusSessionActionViewItem(action, undefined, this.debugService, this.themeService, this.contextViewService, this.configurationService);
return new FocusSessionActionViewItem(action, this.debugService, this.themeService, this.contextViewService, this.configurationService);
}
if (action instanceof MenuItemAction) {
return this.instantiationService.createInstance(MenuEntryActionViewItem, action);
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {

getActionViewItem(action: IAction): IActionViewItem | undefined {
if (action.id === SelectReplAction.ID) {
return this.instantiationService.createInstance(SelectReplActionViewItem, this.selectReplAction, this.tree.getInput());
return this.instantiationService.createInstance(SelectReplActionViewItem, this.selectReplAction);
} else if (action.id === FILTER_ACTION_ID) {
this.filterActionViewItem = this.instantiationService.createInstance(ReplFilterActionViewItem, action, localize('workbench.debug.filter.placeholder', "Filter (e.g. text, !exclude)"), this.filterState);
return this.filterActionViewItem;
Expand Down

0 comments on commit c64a4f0

Please sign in to comment.