@@ -28,7 +28,7 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
2828 _folderHelper = folderHelper ;
2929 _state = state ;
3030 _state . StateChanged += ParserState_StateChanged ;
31-
31+
3232 _refreshCommand = new DelegateCommand ( param => _state . OnParseRequested ( this ) ,
3333 param => ! IsBusy && _state . IsDirty ( ) ) ;
3434
@@ -188,38 +188,38 @@ public string PanelTitle
188188
189189 if ( SelectedItem is CodeExplorerProjectViewModel )
190190 {
191- var node = ( CodeExplorerProjectViewModel ) SelectedItem ;
191+ var node = ( CodeExplorerProjectViewModel ) SelectedItem ;
192192 return node . Declaration . IdentifierName + string . Format ( " - ({0})" , node . Declaration . DeclarationType ) ;
193193 }
194194
195195 if ( SelectedItem is CodeExplorerComponentViewModel )
196196 {
197- var node = ( CodeExplorerComponentViewModel ) SelectedItem ;
197+ var node = ( CodeExplorerComponentViewModel ) SelectedItem ;
198198 return node . Declaration . IdentifierName + string . Format ( " - ({0})" , node . Declaration . DeclarationType ) ;
199199 }
200200
201201 if ( SelectedItem is CodeExplorerMemberViewModel )
202202 {
203- var node = ( CodeExplorerMemberViewModel ) SelectedItem ;
203+ var node = ( CodeExplorerMemberViewModel ) SelectedItem ;
204204 return node . Declaration . IdentifierName + string . Format ( " - ({0})" , node . Declaration . DeclarationType ) ;
205205 }
206206
207207 return SelectedItem . Name ;
208208 }
209209 }
210-
210+
211211 public string Description
212212 {
213213 get
214214 {
215215 if ( SelectedItem is ICodeExplorerDeclarationViewModel )
216216 {
217- return ( ( ICodeExplorerDeclarationViewModel ) SelectedItem ) . Declaration . DescriptionString ;
217+ return ( ( ICodeExplorerDeclarationViewModel ) SelectedItem ) . Declaration . DescriptionString ;
218218 }
219219
220220 if ( SelectedItem is CodeExplorerCustomFolderViewModel )
221221 {
222- return ( ( CodeExplorerCustomFolderViewModel ) SelectedItem ) . FolderAttribute ;
222+ return ( ( CodeExplorerCustomFolderViewModel ) SelectedItem ) . FolderAttribute ;
223223 }
224224
225225 return string . Empty ;
@@ -237,7 +237,7 @@ public ObservableCollection<CodeExplorerItemViewModel> Projects
237237 set
238238 {
239239 _projects = new ObservableCollection < CodeExplorerItemViewModel > ( value . OrderBy ( o => o . NameWithSignature ) ) ;
240-
240+
241241 ReorderChildNodes ( _projects ) ;
242242 OnPropertyChanged ( ) ;
243243 }
@@ -250,12 +250,12 @@ private void ParserState_StateChanged(object sender, EventArgs e)
250250 Projects = new ObservableCollection < CodeExplorerItemViewModel > ( ) ;
251251 }
252252
253- IsBusy = _state . Status == ParserState . Parsing ;
254- if ( _state . Status != ParserState . Ready )
253+ IsBusy = _state . Status < ParserState . ResolvedDeclarations ;
254+ if ( _state . Status != ParserState . ResolvedDeclarations )
255255 {
256256 return ;
257257 }
258-
258+
259259 var userDeclarations = _state . AllUserDeclarations
260260 . GroupBy ( declaration => declaration . Project )
261261 . Where ( grouping => grouping . Key != null )
@@ -273,7 +273,7 @@ private void ParserState_StateChanged(object sender, EventArgs e)
273273 grouping ) ) . ToList ( ) ;
274274
275275 UpdateNodes ( Projects , newProjects ) ;
276-
276+
277277 Projects = new ObservableCollection < CodeExplorerItemViewModel > ( newProjects ) ;
278278 }
279279
@@ -403,7 +403,7 @@ private void SetErrorState(CodeExplorerItemViewModel itemNode, VBComponent compo
403403
404404 if ( node is CodeExplorerComponentViewModel )
405405 {
406- var componentNode = ( CodeExplorerComponentViewModel ) node ;
406+ var componentNode = ( CodeExplorerComponentViewModel ) node ;
407407 if ( componentNode . GetSelectedDeclaration ( ) . QualifiedName . QualifiedModuleName . Component == component )
408408 {
409409 componentNode . IsErrorState = true ;
@@ -472,8 +472,8 @@ private void SetErrorState(CodeExplorerItemViewModel itemNode, VBComponent compo
472472 // this is a special case--we have to reset SelectedItem to prevent a crash
473473 private void ExecuteRemoveComand ( object param )
474474 {
475- var node = ( CodeExplorerComponentViewModel ) SelectedItem ;
476- SelectedItem = Projects . First ( p => ( ( CodeExplorerProjectViewModel ) p ) . Declaration . Project == node . Declaration . Project ) ;
475+ var node = ( CodeExplorerComponentViewModel ) SelectedItem ;
476+ SelectedItem = Projects . First ( p => ( ( CodeExplorerProjectViewModel ) p ) . Declaration . Project == node . Declaration . Project ) ;
477477
478478 _externalRemoveCommand . Execute ( param ) ;
479479 }
0 commit comments