Skip to content

Commit f404c9c

Browse files
authored
Merge pull request #80 from zapta/main
Added right click context menu commands for test and sim.
2 parents f66e30f + 4b1233f commit f404c9c

File tree

6 files changed

+208
-2874
lines changed

6 files changed

+208
-2874
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"cSpell.words": [
33
"Apio",
44
"elif",
5+
"EMPH",
56
"errorlevel",
67
"fpgas",
78
"fpgawars",

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
### Changed
66

7+
- Added right-click context menu command that allows to test or simulate
8+
the selected testbench.
9+
710
- Added a menu command to test only the default testbench, similar to the
811
behavior of the sim command which tests the `default-testbench` defined
912
in `apio.ini`, or the existing testbench if the project has exactly one

package.json

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,44 @@
7676
"when": "apio.sidebar.help.enabled"
7777
}
7878
]
79+
},
80+
"commands": [
81+
{
82+
"command": "apio.simContext",
83+
"title": "Apio sim",
84+
"enablement": "apio.apioIniExists"
85+
},
86+
{
87+
"command": "apio.testContext",
88+
"title": "Apio test",
89+
"enablement": "apio.apioIniExists"
90+
}
91+
],
92+
"menus": {
93+
"explorer/context": [
94+
{
95+
"command": "apio.simContext",
96+
"group": "2_workspace@10",
97+
"when": "apio.apioIniExists && resourceFilename =~ /_tb\\.[s]?v$/ && !explorerResourceIsFolder && resourceScheme == file"
98+
},
99+
{
100+
"command": "apio.testContext",
101+
"group": "2_workspace@10",
102+
"when": "apio.apioIniExists && resourceFilename =~ /_tb\\.[s]?v$/ && !explorerResourceIsFolder && resourceScheme == file"
103+
}
104+
],
105+
"editor/context": [
106+
{
107+
"command": "apio.simContext",
108+
"group": "1_apio@5",
109+
"when": "apio.apioIniExists && resourceFilename =~ /_tb\\.[s]?v$/ && resourceScheme == file"
110+
},
111+
{
112+
"command": "apio.testContext",
113+
"group": "1_apio@5",
114+
"when": "apio.apioIniExists && resourceFilename =~ /_tb\\.[s]?v$/ && resourceScheme == file"
115+
}
116+
]
79117
}
80118
},
81119
"scripts": {
@@ -102,4 +140,4 @@
102140
"eslint": "^9.39.1",
103141
"globals": "^16.5.0"
104142
}
105-
}
143+
}

0 commit comments

Comments
 (0)