1- const  { vscode,  commands }  =  require ( 'vscode' ) ; 
1+ const  vscode  =  require ( 'vscode' ) ; 
22const  path  =  require ( 'path' ) ; 
33const  Svn  =  require ( './svn' ) ; 
44const  svnSCM  =  require ( './svnSCM' ) ; 
@@ -42,6 +42,11 @@ const updateChangesResourceGroup = (data) => {
4242					iconPath : vscode . Uri . file ( path . join ( iconsRootPath ,  `${ item [ 'wc-status' ] . $ . item }  ) ) , 
4343					tooltip : item [ 'wc-status' ] . $ . item , 
4444				} , 
45+ 				command : { 
46+ 					command : 'svn.fileOpen' , 
47+ 					title : 'Open' , 
48+ 					arguments : [ createResourceUri ( item . $ . path ) ] 
49+ 				} 
4550			} ) ; 
4651		} 
4752	} ) ; 
@@ -61,16 +66,21 @@ const updateNotTrackedResourceGroup = (data) => {
6166					iconPath : vscode . Uri . file ( path . join ( iconsRootPath ,  `unversioned.svg` ) ) , 
6267					tooltip : item [ 'wc-status' ] . $ . item , 
6368				} , 
69+ 				command : { 
70+ 					command : 'svn.fileOpen' , 
71+ 					title : 'Open' , 
72+ 					arguments : [ createResourceUri ( item . $ . path ) ] 
73+ 				} 
6474			} ) ; 
6575		} 
6676	} ) ; 
6777
6878	return  matches ; 
6979} 
7080
71- const  registerFileOpenCommand  =  ( resourceUri )  =>  { 
72- 	commands . registerCommand ( 'svn.fileOpen' ,  ( )  =>  { 
73- 		commands . executeCommand ( 'vscode.open' ,  resourceUri ) ; 
81+ const  registerFileOpenCommand  =  ( )  =>  { 
82+ 	vscode . commands . registerCommand ( 'svn.fileOpen' ,  ( resourceUri )  =>  { 
83+ 		vscode . commands . executeCommand ( 'vscode.open' ,  resourceUri ) ; 
7484	} ) ; 
7585} 
7686
@@ -82,6 +92,8 @@ function activate(context) {
8292
8393	const  watcher  =  vscode . workspace . createFileSystemWatcher ( `${ rootPath }  ) ; 
8494
95+ 	registerFileOpenCommand ( ) ; 
96+ 	
8597	const  sourceControl  =  new  svnSCM ( ) ; 
8698	const  contentProvider  =  new  svnContentProvider ( ) ; 
8799	const  svn  =  new  Svn ( ) ; 
0 commit comments