@@ -10,6 +10,7 @@ import {
10
10
import { registerCommands } from "./commands" ;
11
11
import { ConstructorPolicy } from "./common/types" ;
12
12
import { CheckActiveEditor } from "./contexts/checkActiveEditor" ;
13
+ import { OpenRepositoryCount } from "./contexts/openRepositoryCount" ;
13
14
import SvnDecorations from "./decorations/svnDecorations" ;
14
15
import { configuration } from "./helpers/configuration" ;
15
16
import { ItemLogProvider } from "./historyView/itemLogProvider" ;
@@ -30,8 +31,6 @@ async function init(
30
31
outputChannel : OutputChannel ,
31
32
disposables : Disposable [ ]
32
33
) {
33
- commands . executeCommand ( "setContext" , "svnOpenRepositoryCount" , "0" ) ;
34
-
35
34
const pathHint = configuration . get < string > ( "path" ) ;
36
35
const svnFinder = new SvnFinder ( ) ;
37
36
@@ -57,21 +56,13 @@ async function init(
57
56
window . registerTreeDataProvider ( "itemlog" , itemLogProvider ) ;
58
57
59
58
disposables . push ( new CheckActiveEditor ( model ) ) ;
59
+ disposables . push ( new OpenRepositoryCount ( model ) ) ;
60
60
61
61
// First, check the vscode has support to DecorationProvider
62
62
if ( hasSupportToDecorationProvider ( ) ) {
63
63
const decoration = new SvnDecorations ( model ) ;
64
64
disposables . push ( decoration ) ;
65
65
}
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 ( ) ;
75
66
76
67
commands . executeCommand (
77
68
"setContext" ,
0 commit comments