@@ -135,14 +135,24 @@ private void ParseAll()
135135
136136 var components = projects . SelectMany ( p => p . VBComponents . Cast < VBComponent > ( ) ) . ToList ( ) ;
137137 var modified = components . Where ( _state . IsModified ) . ToList ( ) ;
138+ var unchanged = components . Where ( c => ! _state . IsModified ( c ) ) . ToList ( ) ;
138139
139- _state . SetModuleState ( ParserState . LoadingReference ) ;
140+ _state . SetModuleState ( ParserState . LoadingReference ) ; // todo: change that to a simple statusbar text update
140141 LoadComReferences ( projects ) ;
141142
143+ if ( ! modified . Any ( ) )
144+ {
145+ return ;
146+ }
147+
142148 foreach ( var component in modified )
143149 {
144150 _state . SetModuleState ( component , ParserState . Pending ) ;
145151 }
152+ foreach ( var component in unchanged )
153+ {
154+ _state . SetModuleState ( component , ParserState . Parsed ) ;
155+ }
146156
147157 // invalidation cleanup should go into ParseAsync?
148158 foreach ( var invalidated in _componentAttributes . Keys . Except ( components ) )
@@ -152,8 +162,6 @@ private void ParseAll()
152162
153163 foreach ( var vbComponent in modified )
154164 {
155- while ( ! _state . ClearDeclarations ( vbComponent ) ) { }
156-
157165 ParseAsync ( vbComponent , CancellationToken . None ) ;
158166 }
159167 }
@@ -194,11 +202,6 @@ private void LoadComReferences(IEnumerable<VBProject> projects)
194202 }
195203 }
196204
197- public void LoadNewComReferences ( )
198- {
199- LoadComReferences ( _state . Projects ) ;
200- }
201-
202205 public void UnloadComReference ( Reference reference )
203206 {
204207 var referenceId = reference . ReferenceId ( ) ;
0 commit comments