-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #19580; added copy property path action to debug viewlet #43423
Conversation
static LABEL = nls.localize('copyPropertyPath', "Copy Property Path"); | ||
|
||
constructor(id: string, label: string, private value: any) { | ||
super(id, label, 'debug-action copy-property-path'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass the css class since this action does not have that, simply pass undefined
as the third argument
@@ -34,6 +34,23 @@ export class CopyValueAction extends Action { | |||
} | |||
} | |||
|
|||
export class CopyPropertyPathAction extends Action { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CopyEvaluatePathAction
is a better name imho
@@ -34,6 +34,23 @@ export class CopyValueAction extends Action { | |||
} | |||
} | |||
|
|||
export class CopyPropertyPathAction extends Action { | |||
static readonly ID = 'workbench.debug.viewlet.action.copyPropertyPath'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change id to workbench.debug.viewlet.action.copyEvaluatePath'
export class CopyPropertyPathAction extends Action { | ||
static readonly ID = 'workbench.debug.viewlet.action.copyPropertyPath'; | ||
static LABEL = nls.localize('copyPropertyPath', "Copy Property Path"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change the label to "Copy Path"
@@ -179,6 +179,7 @@ class VariablesActionProvider implements IActionProvider { | |||
const actions: IAction[] = []; | |||
const variable = <Variable>element; | |||
actions.push(new SetValueAction(SetValueAction.ID, SetValueAction.LABEL, variable, this.debugService, this.keybindingService)); | |||
actions.push(new CopyPropertyPathAction(CopyPropertyPathAction.ID, CopyPropertyPathAction.LABEL, variable)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set Value and Copy Value should be first, So CopyEvaluatePathAction should come third
@ergun1017 I have commented directly in the code - mostly polish. Once you address all those I can merge this in. Thanks |
@ergun1017 good job, thanks a lot 🍻 |
Fixes #19580