@@ -10,6 +10,7 @@ import {
1010import { registerCommands } from "./commands" ;
1111import { ConstructorPolicy } from "./common/types" ;
1212import { CheckActiveEditor } from "./contexts/checkActiveEditor" ;
13+ import { OpenRepositoryCount } from "./contexts/openRepositoryCount" ;
1314import SvnDecorations from "./decorations/svnDecorations" ;
1415import { configuration } from "./helpers/configuration" ;
1516import { ItemLogProvider } from "./historyView/itemLogProvider" ;
@@ -30,8 +31,6 @@ async function init(
3031 outputChannel : OutputChannel ,
3132 disposables : Disposable [ ]
3233) {
33- commands . executeCommand ( "setContext" , "svnOpenRepositoryCount" , "0" ) ;
34-
3534 const pathHint = configuration . get < string > ( "path" ) ;
3635 const svnFinder = new SvnFinder ( ) ;
3736
@@ -57,21 +56,13 @@ async function init(
5756 window . registerTreeDataProvider ( "itemlog" , itemLogProvider ) ;
5857
5958 disposables . push ( new CheckActiveEditor ( model ) ) ;
59+ disposables . push ( new OpenRepositoryCount ( model ) ) ;
6060
6161 // First, check the vscode has support to DecorationProvider
6262 if ( hasSupportToDecorationProvider ( ) ) {
6363 const decoration = new SvnDecorations ( model ) ;
6464 disposables . push ( decoration ) ;
6565 }
66- const onRepository = ( ) =>
67- commands . executeCommand (
68- "setContext" ,
69- "svnOpenRepositoryCount" ,
70- `${ model . repositories . length } `
71- ) ;
72- model . onDidOpenRepository ( onRepository , null , disposables ) ;
73- model . onDidCloseRepository ( onRepository , null , disposables ) ;
74- onRepository ( ) ;
7566
7667 commands . executeCommand (
7768 "setContext" ,
0 commit comments