|
277 | 277 | }
|
278 | 278 | }
|
279 | 279 | },
|
| 280 | + { |
| 281 | + "id": "vscode-db2i.examples", |
| 282 | + "title": "Examples", |
| 283 | + "properties": { |
| 284 | + "vscode-db2i.examples.customExampleDirectories": { |
| 285 | + "type": "array", |
| 286 | + "items": { |
| 287 | + "type": "string", |
| 288 | + "description": "The directory containing SQL example files." |
| 289 | + }, |
| 290 | + "markdownDescription": "Set of custom directories containing SQL example files to be shown in the `Examples` view. All SQL files in the specified directories and at most one subdirectory level deeper will be picked up.\n\nBy default, the folder name will be the category and the file name will be the name of the example. This can be customized by optionally including a comment in the file with the tags `category` and `description`.", |
| 291 | + "default": [] |
| 292 | + } |
| 293 | + } |
| 294 | + }, |
280 | 295 | {
|
281 | 296 | "id": "vscode-db2i.syntax",
|
282 | 297 | "title": "SQL Syntax Options",
|
|
804 | 819 | "category": "Db2 for i (Examples)",
|
805 | 820 | "icon": "$(clear-all)"
|
806 | 821 | },
|
| 822 | + { |
| 823 | + "command": "vscode-db2i.examples.reload", |
| 824 | + "title": "Refresh Examples", |
| 825 | + "category": "Db2 for i (Examples)", |
| 826 | + "icon": "$(refresh)" |
| 827 | + }, |
| 828 | + { |
| 829 | + "command": "vscode-db2i.examples.save", |
| 830 | + "title": "Save As New Example", |
| 831 | + "category": "Db2 for i (Examples)", |
| 832 | + "icon": "$(save)" |
| 833 | + }, |
| 834 | + { |
| 835 | + "command": "vscode-db2i.examples.add", |
| 836 | + "title": "Add...", |
| 837 | + "category": "Db2 for i (Examples)" |
| 838 | + }, |
| 839 | + { |
| 840 | + "command": "vscode-db2i.examples.remove", |
| 841 | + "title": "Remove...", |
| 842 | + "category": "Db2 for i (Examples)" |
| 843 | + }, |
| 844 | + { |
| 845 | + "command": "vscode-db2i.examples.edit", |
| 846 | + "title": "Edit Example", |
| 847 | + "category": "Db2 for i (Examples)" |
| 848 | + }, |
807 | 849 | {
|
808 | 850 | "command": "vscode-db2i.notebook.fromSqlUri",
|
809 | 851 | "title": "Open as Notebook",
|
|
966 | 1008 | "command": "vscode-db2i.jobManager.deleteConfig",
|
967 | 1009 | "when": "never"
|
968 | 1010 | },
|
| 1011 | + { |
| 1012 | + "command": "vscode-db2i.examples.edit", |
| 1013 | + "when": "never" |
| 1014 | + }, |
969 | 1015 | {
|
970 | 1016 | "command": "vscode-db2i.notebook.fromSqlUri",
|
971 | 1017 | "when": "never"
|
|
1039 | 1085 | "when": "view == vscode-db2i.dove.node"
|
1040 | 1086 | },
|
1041 | 1087 | {
|
1042 |
| - "command": "vscode-db2i.queryHistory.clear", |
1043 |
| - "group": "navigation", |
| 1088 | + "command": "vscode-db2i.queryHistory.find", |
| 1089 | + "group": "navigation@0", |
1044 | 1090 | "when": "view == queryHistory"
|
1045 | 1091 | },
|
1046 | 1092 | {
|
1047 |
| - "command": "vscode-db2i.queryHistory.find", |
1048 |
| - "group": "navigation", |
| 1093 | + "command": "vscode-db2i.queryHistory.clear", |
| 1094 | + "group": "navigation@1", |
1049 | 1095 | "when": "view == queryHistory"
|
1050 | 1096 | },
|
1051 | 1097 | {
|
|
1110 | 1156 | },
|
1111 | 1157 | {
|
1112 | 1158 | "command": "vscode-db2i.examples.setFilter",
|
1113 |
| - "group": "navigation", |
| 1159 | + "group": "navigation@0", |
1114 | 1160 | "when": "view == exampleBrowser"
|
1115 | 1161 | },
|
1116 | 1162 | {
|
1117 | 1163 | "command": "vscode-db2i.examples.clearFilter",
|
1118 |
| - "group": "navigation", |
| 1164 | + "group": "navigation@1", |
| 1165 | + "when": "view == exampleBrowser" |
| 1166 | + }, |
| 1167 | + { |
| 1168 | + "command": "vscode-db2i.examples.save", |
| 1169 | + "group": "navigation@2", |
| 1170 | + "when": "view == exampleBrowser" |
| 1171 | + }, |
| 1172 | + { |
| 1173 | + "submenu": "vscode-db2i.customExampleDirectories", |
| 1174 | + "group": "navigation@3", |
| 1175 | + "when": "view == exampleBrowser" |
| 1176 | + }, |
| 1177 | + { |
| 1178 | + "command": "vscode-db2i.examples.reload", |
| 1179 | + "group": "navigation@4", |
1119 | 1180 | "when": "view == exampleBrowser"
|
1120 | 1181 | }
|
1121 | 1182 | ],
|
|
1288 | 1349 | "command": "vscode-db2i.self.explainSelf",
|
1289 | 1350 | "when": "view == vscode-db2i.self.nodes && viewItem == selfCodeNode && vscode-db2i:continueExtensionActive",
|
1290 | 1351 | "group": "navigation"
|
| 1352 | + }, |
| 1353 | + { |
| 1354 | + "command": "vscode-db2i.examples.edit", |
| 1355 | + "when": "view == exampleBrowser && viewItem == example.custom", |
| 1356 | + "group": "0_open" |
1291 | 1357 | }
|
1292 | 1358 | ],
|
1293 | 1359 | "editor/title": [
|
|
1349 | 1415 | "group": "navigation_notebook@1"
|
1350 | 1416 | }
|
1351 | 1417 | ],
|
| 1418 | + "vscode-db2i.customExampleDirectories": [ |
| 1419 | + { |
| 1420 | + "command": "vscode-db2i.examples.add", |
| 1421 | + "group": "navigation@0" |
| 1422 | + }, |
| 1423 | + { |
| 1424 | + "command": "vscode-db2i.examples.remove", |
| 1425 | + "group": "navigation@1" |
| 1426 | + } |
| 1427 | + ], |
1352 | 1428 | "notebook/toolbar": [
|
1353 | 1429 | {
|
1354 | 1430 | "command": "vscode-db2i.notebook.exportAsHtml",
|
|
1362 | 1438 | "icon": "$(notebook-execute)",
|
1363 | 1439 | "id": "sql/editor/context",
|
1364 | 1440 | "label": "Run SQL statement"
|
| 1441 | + }, |
| 1442 | + { |
| 1443 | + "id": "vscode-db2i.customExampleDirectories", |
| 1444 | + "label": "Custom Example Directories", |
| 1445 | + "icon": "$(folder-library)" |
1365 | 1446 | }
|
1366 | 1447 | ],
|
1367 | 1448 | "keybindings": [
|
|
0 commit comments