-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.js
107 lines (102 loc) · 2.63 KB
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
const vscode = require("vscode")
const {
CreateTypespecProject,
ImportTypespecFromOpenai3,
GenerateFromTypespec,
TypespecExtensionBasicFeatures
} = require("./src/TreeDataProviders")
const { showInformation } = require("./src/common/message")
const { createTemplates } = require("./src/createTypespecProject/index")
/**
* @param {vscode.ExtensionContext} context
*/
function activate(context) {
// create Provider/Item
const createProvider = new CreateTypespecProject()
const importProvider = new ImportTypespecFromOpenai3()
const generateProvider = new GenerateFromTypespec()
const featuresProvider = new TypespecExtensionBasicFeatures()
vscode.window.registerTreeDataProvider(
"create-typespec-project-test",
createProvider
)
vscode.window.registerTreeDataProvider(
"generate-from-typespec-test",
importProvider
)
vscode.window.registerTreeDataProvider(
"import-typespec-from-openapi3-test",
generateProvider
)
vscode.window.registerTreeDataProvider(
"typespec-extension-basic-features-test",
featuresProvider
)
const Create_1 = vscode.commands.registerCommand(
"typespec-automation.Create-1",
() => createTemplates("NonBranded")
)
const Create_2 = vscode.commands.registerCommand(
"typespec-automation.Create-2",
() => createTemplates("AzurePlan")
)
const Create_All = vscode.commands.registerCommand(
"typespec-automation.Create-All",
() => {
showInformation("Stay tuned")
}
)
const Generate_1 = vscode.commands.registerCommand(
"typespec-automation.Generate-1",
() => {
showInformation("Stay tuned")
}
)
const Generate_2 = vscode.commands.registerCommand(
"typespec-automation.Generate-2",
() => {
showInformation("Stay tuned")
}
)
const Import_1 = vscode.commands.registerCommand(
"typespec-automation.Import-1",
() => {
showInformation("Stay tuned")
}
)
const Import_2 = vscode.commands.registerCommand(
"typespec-automation.Import-2",
() => {
showInformation("Stay tuned")
}
)
const Feature_1 = vscode.commands.registerCommand(
"typespec-automation.Feature-1",
() => {
showInformation("Stay tuned")
}
)
const Feature_2 = vscode.commands.registerCommand(
"typespec-automation.Feature-2",
() => {
showInformation("Stay tuned")
}
)
context.subscriptions.push(
Create_1,
Create_2,
Create_All,
Generate_1,
Generate_2,
Import_1,
Import_2,
Feature_1,
Feature_2
)
// vscode.commands.executeCommand("typespec-automation.Create-1")
}
function deactivate() {}
module.exports = {
activate,
deactivate
}