@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
return ( mod && mod . __esModule ) ? mod : { "default" : mod } ;
4
4
} ;
5
5
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
6
- exports . registerTreeViews = exports . registerCommands = void 0 ;
6
+ exports . createTreeViews = exports . registerCommands = void 0 ;
7
7
const hbuilderx_1 = __importDefault ( require ( "hbuilderx" ) ) ;
8
8
const depot_1 = __importDefault ( require ( "./trees/depot" ) ) ;
9
9
const mr_1 = __importDefault ( require ( "./trees/mr" ) ) ;
@@ -17,26 +17,26 @@ function registerCommands(context) {
17
17
context . subscriptions . push ( hbuilderx_1 . default . commands . registerCommand ( 'codingPlugin.mrTreeItemClick' , function ( param ) {
18
18
// hx.window.showInformationMessage('选中了TreeItem:' + param[0]);
19
19
// webviewProvider.update(param[0]);
20
- hbuilderx_1 . default . env . openExternal ( repo_1 . getMRUrl ( repoInfo . team , param [ 0 ] ) ) ;
20
+ hbuilderx_1 . default . env . openExternal ( repo_1 . getMRUrl ( repoInfo . team , param ) ) ;
21
+ } ) ) ;
22
+ context . subscriptions . push ( hbuilderx_1 . default . commands . registerCommand ( 'codingPlugin.depotTreeItemClick' , function ( param ) {
23
+ hbuilderx_1 . default . env . openExternal ( repo_1 . getDepotUrl ( repoInfo . team , param ) ) ;
21
24
} ) ) ;
22
25
}
23
26
exports . registerCommands = registerCommands ;
24
- function registerTreeViews ( context ) {
27
+ function createTreeViews ( context ) {
25
28
context . subscriptions . push ( hbuilderx_1 . default . window . createTreeView ( 'codingPlugin.treeMR' , {
26
29
showCollapseAll : true ,
27
30
treeDataProvider : new mr_1 . default ( context )
28
31
} ) ) ;
29
32
context . subscriptions . push ( hbuilderx_1 . default . window . createTreeView ( 'codingPlugin.treeDepot' , {
30
33
showCollapseAll : true ,
31
- treeDataProvider : new depot_1 . default ( context , [
32
- { name : '仓库列表' , children : [ { name : '111' } ] } ,
33
- { name : '创建仓库' }
34
- ] )
34
+ treeDataProvider : new depot_1 . default ( context )
35
35
} ) ) ;
36
36
}
37
- exports . registerTreeViews = registerTreeViews ;
37
+ exports . createTreeViews = createTreeViews ;
38
38
function init ( context ) {
39
39
registerCommands ( context ) ;
40
- registerTreeViews ( context ) ;
40
+ createTreeViews ( context ) ;
41
41
}
42
42
exports . default = init ;
0 commit comments