-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.js
31 lines (24 loc) · 1 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
const hx = require("hbuilderx");
const path = require("path");
// let webviewEditorProvider = require('./src/webview/main.js');
let vueEditorProvider = require("./src/vue/vueMain.js");
let checkUpdate = require('./src/common/checkUpdate.js');
function activate(context) {
let editorFileName = '可视化自定义快捷键视图';
try {
// hx.window.registerCustomEditorProvider("visualizationOfCustomizableShortcutKeys", new webviewEditorProvider({}));
hx.window.registerCustomEditorProvider("visualizationOfCustomizableShortcutKeys", new vueEditorProvider());
} catch (error) {};
let keyboardShortcutSupport = hx.commands.registerCommand('extension.keyboardShortcutSupport', (param) => {
const cscratFile = path.join(__dirname, 'template', editorFileName);
hx.workspace.openTextDocument(cscratFile);
checkUpdate();
});
context.subscriptions.push(keyboardShortcutSupport);
}
function deactivate() {
}
module.exports = {
activate,
deactivate
}