@@ -11,31 +11,49 @@ namespace Rubberduck.UI.CodeExplorer
11
11
public class CodeExplorerViewModel : ViewModelBase
12
12
{
13
13
private readonly RubberduckParserState _state ;
14
- private readonly ObservableCollection < ExplorerItemViewModel > _children ;
15
14
16
- public CodeExplorerViewModel ( RubberduckParserState state , ObservableCollection < ExplorerItemViewModel > children )
15
+ public CodeExplorerViewModel ( RubberduckParserState state )
17
16
{
18
17
_state = state ;
19
- _children = children ;
18
+ _state . StateChanged += ParserState_StateChanged ;
19
+ _state . ModuleStateChanged += ParserState_ModuleStateChanged ;
20
20
}
21
21
22
22
private bool _isBusy ;
23
23
public bool IsBusy { get { return _isBusy ; } set { _isBusy = value ; OnPropertyChanged ( ) ; } }
24
24
25
+ private void ParserState_StateChanged ( object sender , EventArgs e )
26
+ {
27
+ IsBusy = _state . Status == ParserState . Parsing ;
28
+ }
29
+
30
+ private void ParserState_ModuleStateChanged ( object sender , Parsing . ParseProgressEventArgs e )
31
+ {
32
+
33
+ }
34
+ }
25
35
36
+ public class ExplorerProjectItemViewModel : ViewModelBase
37
+ {
38
+
39
+ }
40
+
41
+ public class ExplorerComponentItemViewModel : ViewModelBase
42
+ {
43
+
26
44
}
27
45
28
- public class ExplorerItemViewModel : ViewModelBase
46
+ public class ExplorerMemberViewModel : ViewModelBase
29
47
{
30
48
private readonly Declaration _declaration ;
31
- private readonly ConcurrentStack < ExplorerItemViewModel > _children = new ConcurrentStack < ExplorerItemViewModel > ( ) ;
49
+ private readonly ConcurrentStack < ExplorerMemberViewModel > _children = new ConcurrentStack < ExplorerMemberViewModel > ( ) ;
32
50
33
- public ExplorerItemViewModel ( Declaration declaration )
51
+ public ExplorerMemberViewModel ( Declaration declaration )
34
52
{
35
53
_declaration = declaration ;
36
54
}
37
55
38
- public void AddChild ( ExplorerItemViewModel declaration )
56
+ public void AddChild ( ExplorerMemberViewModel declaration )
39
57
{
40
58
_children . Push ( declaration ) ;
41
59
}
0 commit comments