Skip to content

Commit 5f1257c

Browse files
James PogranTylerLeonhardt
James Pogran
authored andcommitted
Provide Run Selection button in Editor Title Menu (#2224)
* Provide Run Selection button in Editor Title Menu This commit adds a editor title menu button for the `powershell.RunSelection` command in the primary navigation group, and a custom `play` icon based on ones from the https://github.com/microsoft/vscode-icons repo. This shows the button in the visible part of the menu when a PowerShell file is open.
1 parent 7df727d commit 5f1257c

File tree

5 files changed

+42
-1
lines changed

5 files changed

+42
-1
lines changed

package.json

+26-1
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,23 @@
161161
},
162162
"category": "PowerShell"
163163
},
164+
{
165+
"command": "workbench.action.debug.start",
166+
"title": "Run",
167+
"category": "PowerShell",
168+
"icon": {
169+
"light": "resources/light/run.svg",
170+
"dark": "resources/dark/run.svg"
171+
}
172+
},
164173
{
165174
"command": "PowerShell.RunSelection",
166175
"title": "Run Selection",
167-
"category": "PowerShell"
176+
"category": "PowerShell",
177+
"icon": {
178+
"light": "resources/light/play.svg",
179+
"dark": "resources/dark/play.svg"
180+
}
168181
},
169182
{
170183
"command": "PowerShell.RestartSession",
@@ -260,6 +273,18 @@
260273
"group": "2_powershell"
261274
}
262275
],
276+
"editor/title": [
277+
{
278+
"when": "resourceLangId == powershell",
279+
"command": "workbench.action.debug.start",
280+
"group": "navigation@100"
281+
},
282+
{
283+
"when": "resourceLangId == powershell",
284+
"command": "PowerShell.RunSelection",
285+
"group": "navigation@101"
286+
}
287+
],
263288
"editor/title/context": [
264289
{
265290
"when": "resourceFilename =~ /\\.tests\\.ps1$/i",

resources/dark/play.svg

+5
Loading

resources/dark/run.svg

+3
Loading

resources/light/play.svg

+5
Loading

resources/light/run.svg

+3
Loading

0 commit comments

Comments
 (0)