-
Notifications
You must be signed in to change notification settings - Fork 1
/
extension.js
executable file
·35 lines (29 loc) · 1.09 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
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
// eslint-disable-next-line no-unused-vars
const vscode = require("vscode");
const { init } = require("./src/init");
const registerCommands = require("./src/registerCommands");
const registerProviders = require("./src/registerProviders");
const { dataObject } = require("./src/utils");
// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed
/**
* @param {vscode.ExtensionContext} context
*/
async function activate(context) {
dataObject(); // To initialize the data.json file
registerCommands();
// DO NOT MOVE THESE LINES ABOVE. THESE 2 LINES MUST BE FIRST
await init(context);
registerProviders(context);
console.log('"avr-utils" is now active!');
}
// This method is called when your extension is deactivated
function deactivate() {
vscode.commands.executeCommand('setContext', 'avr-utils.isAvrC', false);
}
module.exports = {
activate,
deactivate,
};