Skip to content

Commit bb55ec8

Browse files
committed
change: commands.
1 parent c7b288e commit bb55ec8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "coding-plugin",
33
"description": "Coding plugin for VS Code.",
4-
"version": "0.0.1",
4+
"version": "1.0.0",
55
"publisher": "alcheung",
66
"license": "MIT",
77
"engines": {
@@ -13,19 +13,18 @@
1313
"activationEvents": [
1414
"onCommand:codingPlugin.show",
1515
"onCommand:codingPlugin.login",
16-
"onWebviewPanel:codingPlugin",
1716
"onView:treeViewSample"
1817
],
1918
"repository": {
2019
"type": "git",
21-
"url": "https://github.com/microsoft/vscode-extension-samples.git"
20+
"url": "https://github.com/cangzhang/coding-vscode.git"
2221
},
2322
"main": "./out/extension.js",
2423
"contributes": {
2524
"commands": [
2625
{
2726
"command": "codingPlugin.show",
28-
"title": "Start coding session",
27+
"title": "Show coding tree",
2928
"category": "Coding plugin"
3029
},
3130
{
@@ -41,6 +40,7 @@
4140
{
4241
"command": "codingPlugin.refresh",
4342
"title": "Refresh",
43+
"category": "Coding plugin",
4444
"icon": {
4545
"light": "src/assets/refresh.light.svg",
4646
"dark": "src/assets/refresh.dark.svg"

src/extension.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as vscode from 'vscode';
33
// import Logger from './common/logger';
44
import { uriHandler, CodingServer } from './codingServer';
55
import { Panel } from './panel';
6-
import { ListProvider } from './tree';
6+
import { ListItem, ListProvider } from './tree';
77

88
export async function activate(context: vscode.ExtensionContext) {
99
const repoInfo = await CodingServer.getRepoParams();
@@ -15,12 +15,13 @@ export async function activate(context: vscode.ExtensionContext) {
1515
}
1616

1717
const treeDataProvider = new ListProvider(context, codingAuth, repoInfo);
18-
vscode.window.registerTreeDataProvider(`treeViewSample`, treeDataProvider);
18+
const tree = vscode.window.createTreeView(`treeViewSample`, { treeDataProvider });
1919

2020
context.subscriptions.push(vscode.window.registerUriHandler(uriHandler));
2121
context.subscriptions.push(
2222
vscode.commands.registerCommand('codingPlugin.show', () => {
2323
Panel.createOrShow(context);
24+
tree.reveal({} as ListItem);
2425
}),
2526
);
2627
context.subscriptions.push(

0 commit comments

Comments
 (0)