|
9 | 9 | } from "vscode"; |
10 | 10 | import Logger from "../logger.mjs"; |
11 | 11 | import { extensionName } from "../commands/command.mjs"; |
12 | | -import NewProjectCommand from "../commands/newProject.mjs"; |
| 12 | +import NewProjectCommand, { ProjectLang } from "../commands/newProject.mjs"; |
13 | 13 | import CompileProjectCommand from "../commands/compileProject.mjs"; |
14 | 14 | import RunProjectCommand from "../commands/runProject.mjs"; |
15 | 15 | import SwitchSDKCommand from "../commands/switchSDK.mjs"; |
@@ -39,7 +39,8 @@ const COMMON_COMMANDS_PARENT_LABEL = "General"; |
39 | 39 | const PROJECT_COMMANDS_PARENT_LABEL = "Project"; |
40 | 40 | const DOCUMENTATION_COMMANDS_PARENT_LABEL = "Documentation"; |
41 | 41 |
|
42 | | -const NEW_PROJECT_LABEL = "New Project"; |
| 42 | +const NEW_C_CPP_PROJECT_LABEL = "New C/C++ Project"; |
| 43 | +const NEW_MICROPYTHON_PROJECT_LABEL = "New MicroPython Project"; |
43 | 44 | const IMPORT_PROJECT_LABEL = "Import Project"; |
44 | 45 | const EXAMPLE_PROJECT_LABEL = "New Project From Example"; |
45 | 46 | const SWITCH_SDK_LABEL = "Switch SDK"; |
@@ -78,10 +79,13 @@ export class PicoProjectActivityBar |
78 | 79 | element: QuickAccessCommand |
79 | 80 | ): TreeItem | Thenable<TreeItem> { |
80 | 81 | switch (element.label) { |
81 | | - case NEW_PROJECT_LABEL: |
| 82 | + case NEW_C_CPP_PROJECT_LABEL: |
82 | 83 | // alt. "new-folder" |
83 | 84 | element.iconPath = new ThemeIcon("file-directory-create"); |
84 | 85 | break; |
| 86 | + case NEW_MICROPYTHON_PROJECT_LABEL: |
| 87 | + element.iconPath = new ThemeIcon("file-directory-create"); |
| 88 | + break; |
85 | 89 | case IMPORT_PROJECT_LABEL: |
86 | 90 | // alt. "repo-pull" |
87 | 91 | element.iconPath = new ThemeIcon("repo-clone"); |
@@ -158,11 +162,21 @@ export class PicoProjectActivityBar |
158 | 162 | } else if (element.label === COMMON_COMMANDS_PARENT_LABEL) { |
159 | 163 | return [ |
160 | 164 | new QuickAccessCommand( |
161 | | - NEW_PROJECT_LABEL, |
| 165 | + NEW_C_CPP_PROJECT_LABEL, |
| 166 | + TreeItemCollapsibleState.None, |
| 167 | + { |
| 168 | + command: `${extensionName}.${NewProjectCommand.id}`, |
| 169 | + title: NEW_C_CPP_PROJECT_LABEL, |
| 170 | + arguments: [ProjectLang.cCpp], |
| 171 | + } |
| 172 | + ), |
| 173 | + new QuickAccessCommand( |
| 174 | + NEW_MICROPYTHON_PROJECT_LABEL, |
162 | 175 | TreeItemCollapsibleState.None, |
163 | 176 | { |
164 | 177 | command: `${extensionName}.${NewProjectCommand.id}`, |
165 | | - title: NEW_PROJECT_LABEL, |
| 178 | + title: NEW_MICROPYTHON_PROJECT_LABEL, |
| 179 | + arguments: [ProjectLang.micropython], |
166 | 180 | } |
167 | 181 | ), |
168 | 182 | new QuickAccessCommand( |
|
0 commit comments