Skip to content

Commit bf069ce

Browse files
committed
add webview, icon
1 parent d6f7923 commit bf069ce

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

package.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
},
1717
"main": "./out/extension.js",
1818
"activationEvents": [
19-
"onLanguage:javascript"
19+
"onLanguage:javascript",
20+
"onView:nodeDependencies"
2021
],
2122
"contributes": {
2223
"commands": [
@@ -71,7 +72,26 @@
7172
"command": "source-academy.eval-editor",
7273
"key": "shift+enter"
7374
}
74-
]
75+
],
76+
"views": {
77+
"source-academy": [
78+
{
79+
"id": "nodeDependencies",
80+
"name": "Assessments",
81+
"icon": "media/dep.svg",
82+
"contextualTitle": "Package Explorer"
83+
}
84+
]
85+
},
86+
"viewsContainers": {
87+
"activitybar": [
88+
{
89+
"id": "source-academy",
90+
"title": "Source Academy",
91+
"icon": "assets/sa.svg"
92+
}
93+
]
94+
}
7595
},
7696
"scripts-info": {
7797
"build": "Builds/obtains bundles required for the extension",

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
// The module 'vscode' contains the VS Code extensibility API
22
// Import the module and reference it with the alias vscode in your code below
33
import * as vscode from "vscode";
4+
import { showPanel } from "./commands/showPanel";
5+
import { setupTreeView } from "./view/test";
46
import { setupStatusBar } from "./statusbar/status";
57
import { registerAllCommands } from "./commands";
68
import { activateLspClient, deactivateLspClient } from "./lsp/client";
7-
import { showPanel } from "./commands/showPanel";
89

910
// This method is called when your extension is activated
1011
// Your extension is activated the very first time the command is executed
1112
export function activate(context: vscode.ExtensionContext) {
13+
console.log("Source Academy extension is now active!");
14+
setupTreeView();
1215
registerAllCommands(context);
1316

1417
context.subscriptions.push(setupStatusBar(context));

0 commit comments

Comments
 (0)