Skip to content

Commit 4dc0183

Browse files
committed
minor polish
1 parent 6ae9291 commit 4dc0183

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/vs/workbench/contrib/debug/electron-browser/electronDebugActions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ import { isWindows } from 'vs/base/common/platform';
1313
export class CopyValueAction extends Action {
1414
static readonly ID = 'workbench.debug.viewlet.action.copyValue';
1515
static LABEL = nls.localize('copyValue', "Copy Value");
16-
private context: string;
1716

18-
constructor(id: string, label: string, private value: any, @IDebugService private readonly debugService: IDebugService, context?: string) {
17+
constructor(id: string, label: string, private value: any, private context: string, @IDebugService private readonly debugService: IDebugService) {
1918
super(id, label, 'debug-action copy-value');
20-
this.context = context;
2119
this._enabled = typeof this.value === 'string' || (this.value instanceof Variable && !!this.value.evaluateName);
2220
}
2321

src/vs/workbench/contrib/debug/electron-browser/variablesView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class VariablesView extends ViewletPanel {
140140
const actions: IAction[] = [];
141141
const variable = element as Variable;
142142
actions.push(new SetValueAction(SetValueAction.ID, SetValueAction.LABEL, variable, this.debugService, this.keybindingService));
143-
actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, variable, this.debugService, 'variables'));
143+
actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, variable, 'variables', this.debugService));
144144
actions.push(new CopyEvaluatePathAction(CopyEvaluatePathAction.ID, CopyEvaluatePathAction.LABEL, variable));
145145
actions.push(new Separator());
146146
actions.push(new AddToWatchExpressionsAction(AddToWatchExpressionsAction.ID, AddToWatchExpressionsAction.LABEL, variable, this.debugService, this.keybindingService));

src/vs/workbench/contrib/debug/electron-browser/watchExpressionsView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class WatchExpressionsView extends ViewletPanel {
148148
actions.push(new AddWatchExpressionAction(AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL, this.debugService, this.keybindingService));
149149
actions.push(new EditWatchExpressionAction(EditWatchExpressionAction.ID, EditWatchExpressionAction.LABEL, this.debugService, this.keybindingService));
150150
if (!expression.hasChildren) {
151-
actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, expression.value, this.debugService, 'watch'));
151+
actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, expression.value, 'watch', this.debugService));
152152
}
153153
actions.push(new Separator());
154154

@@ -159,7 +159,7 @@ export class WatchExpressionsView extends ViewletPanel {
159159
if (element instanceof Variable) {
160160
const variable = element as Variable;
161161
if (!variable.hasChildren) {
162-
actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, variable, this.debugService, 'watch'));
162+
actions.push(new CopyValueAction(CopyValueAction.ID, CopyValueAction.LABEL, variable, 'watch', this.debugService));
163163
}
164164
actions.push(new Separator());
165165
}

0 commit comments

Comments
 (0)