Skip to content

Commit c084e31

Browse files
committed
Simplify command expressions
Use only `||` and clearly specify when each item should be visible.
1 parent 9046844 commit c084e31

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

extensions/ql-vscode/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@
668668
{
669669
"command": "codeQLQueryHistory.removeHistoryItem",
670670
"group": "9_qlCommands",
671-
"when": "view == codeQLQueryHistory && viewItem != inProgressResultsItem"
671+
"when": "viewItem == interpretedResultsItem || viewItem == rawResultsItem || viewItem == cancelledResultsItem"
672672
},
673673
{
674674
"command": "codeQLQueryHistory.setLabel",
@@ -678,12 +678,12 @@
678678
{
679679
"command": "codeQLQueryHistory.compareWith",
680680
"group": "9_qlCommands",
681-
"when": "view == codeQLQueryHistory && (viewItem == rawResultsItem || viewItem == interpretedResultsItem)"
681+
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem"
682682
},
683683
{
684684
"command": "codeQLQueryHistory.showQueryLog",
685685
"group": "9_qlCommands",
686-
"when": "view == codeQLQueryHistory && (viewItem == rawResultsItem || viewItem == interpretedResultsItem)"
686+
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem"
687687
},
688688
{
689689
"command": "codeQLQueryHistory.showQueryText",
@@ -693,37 +693,37 @@
693693
{
694694
"command": "codeQLQueryHistory.viewCsvResults",
695695
"group": "9_qlCommands",
696-
"when": "view == codeQLQueryHistory && viewItem == rawResultsItem"
696+
"when": "viewItem == rawResultsItem"
697697
},
698698
{
699699
"command": "codeQLQueryHistory.viewCsvAlerts",
700700
"group": "9_qlCommands",
701-
"when": "view == codeQLQueryHistory && viewItem == interpretedResultsItem"
701+
"when": "viewItem == interpretedResultsItem"
702702
},
703703
{
704704
"command": "codeQLQueryHistory.viewSarifAlerts",
705705
"group": "9_qlCommands",
706-
"when": "view == codeQLQueryHistory && viewItem == interpretedResultsItem"
706+
"when": "viewItem == interpretedResultsItem"
707707
},
708708
{
709709
"command": "codeQLQueryHistory.viewDil",
710710
"group": "9_qlCommands",
711-
"when": "view == codeQLQueryHistory && (viewItem == rawResultsItem || viewItem == interpretedResultsItem)"
711+
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem"
712712
},
713713
{
714714
"command": "codeQLQueryHistory.cancel",
715715
"group": "9_qlCommands",
716-
"when": "view == codeQLQueryHistory && viewItem == inProgressResultsItem"
716+
"when": "viewItem == inProgressResultsItem"
717717
},
718718
{
719719
"command": "codeQLTests.showOutputDifferences",
720720
"group": "qltest@1",
721-
"when": "view == test-explorer && viewItem == testWithSource"
721+
"when": "viewItem == testWithSource"
722722
},
723723
{
724724
"command": "codeQLTests.acceptOutput",
725725
"group": "qltest@2",
726-
"when": "view == test-explorer && viewItem == testWithSource"
726+
"when": "viewItem == testWithSource"
727727
}
728728
],
729729
"explorer/context": [

0 commit comments

Comments
 (0)