Skip to content

Commit bd8e699

Browse files
committed
Disable commands and buttons when in openqasm spec mode
1 parent 96152b0 commit bd8e699

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

vscode/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,27 +160,27 @@
160160
"editor/title/run": [
161161
{
162162
"command": "qsharp-vscode.runProgram",
163-
"when": "resourceLangId == qsharp || resourceLangId == openqasm || resourceLangId == qsharpcircuit",
163+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)",
164164
"group": "navigation@1"
165165
},
166166
{
167167
"command": "qsharp-vscode.debugProgram",
168-
"when": "resourceLangId == qsharp || resourceLangId == openqasm || resourceLangId == qsharpcircuit",
168+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)",
169169
"group": "navigation@2"
170170
}
171171
],
172172
"commandPalette": [
173173
{
174174
"command": "qsharp-vscode.runProgram",
175-
"when": "resourceLangId == qsharp || resourceLangId == openqasm || resourceLangId == qsharpcircuit"
175+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
176176
},
177177
{
178178
"command": "qsharp-vscode.debugProgram",
179-
"when": "resourceLangId == qsharp || resourceLangId == openqasm || resourceLangId == qsharpcircuit"
179+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
180180
},
181181
{
182182
"command": "qsharp-vscode.runEditorContentsWithCircuit",
183-
"when": "resourceLangId == qsharp || resourceLangId == openqasm"
183+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
184184
},
185185
{
186186
"command": "qsharp-vscode.targetSubmit",
@@ -204,31 +204,31 @@
204204
},
205205
{
206206
"command": "qsharp-vscode.getQir",
207-
"when": "resourceLangId == qsharp || resourceLangId == openqasm"
207+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
208208
},
209209
{
210210
"command": "qsharp-vscode.showHistogram",
211-
"when": "resourceLangId == qsharp || resourceLangId == openqasm"
211+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
212212
},
213213
{
214214
"command": "qsharp-vscode.showRe",
215-
"when": "resourceLangId == qsharp || resourceLangId == openqasm"
215+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
216216
},
217217
{
218218
"command": "qsharp-vscode.showHelp",
219219
"when": "resourceLangId == qsharp"
220220
},
221221
{
222222
"command": "qsharp-vscode.showCircuit",
223-
"when": "resourceLangId == qsharp || resourceLangId == openqasm"
223+
"when": "(resourceLangId == qsharp || resourceLangId == qsharpcircuit) || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
224224
},
225225
{
226226
"command": "qsharp-vscode.showDocumentation",
227227
"when": "resourceLangId == qsharp"
228228
},
229229
{
230230
"command": "qsharp-vscode.setTargetProfile",
231-
"when": "resourceLangId == qsharp || resourceLangId == openqasm"
231+
"when": "resourceLangId == qsharp || (resourceLangId == openqasm && !config.qdk.openqasm.enableSpecMode)"
232232
},
233233
{
234234
"command": "qsharp-vscode.webOpener",

0 commit comments

Comments
 (0)