@@ -135,14 +135,24 @@ private void ParseAll()
135
135
136
136
var components = projects . SelectMany ( p => p . VBComponents . Cast < VBComponent > ( ) ) . ToList ( ) ;
137
137
var modified = components . Where ( _state . IsModified ) . ToList ( ) ;
138
+ var unchanged = components . Where ( c => ! _state . IsModified ( c ) ) . ToList ( ) ;
138
139
139
- _state . SetModuleState ( ParserState . LoadingReference ) ;
140
+ _state . SetModuleState ( ParserState . LoadingReference ) ; // todo: change that to a simple statusbar text update
140
141
LoadComReferences ( projects ) ;
141
142
143
+ if ( ! modified . Any ( ) )
144
+ {
145
+ return ;
146
+ }
147
+
142
148
foreach ( var component in modified )
143
149
{
144
150
_state . SetModuleState ( component , ParserState . Pending ) ;
145
151
}
152
+ foreach ( var component in unchanged )
153
+ {
154
+ _state . SetModuleState ( component , ParserState . Parsed ) ;
155
+ }
146
156
147
157
// invalidation cleanup should go into ParseAsync?
148
158
foreach ( var invalidated in _componentAttributes . Keys . Except ( components ) )
@@ -152,8 +162,6 @@ private void ParseAll()
152
162
153
163
foreach ( var vbComponent in modified )
154
164
{
155
- while ( ! _state . ClearDeclarations ( vbComponent ) ) { }
156
-
157
165
ParseAsync ( vbComponent , CancellationToken . None ) ;
158
166
}
159
167
}
@@ -194,11 +202,6 @@ private void LoadComReferences(IEnumerable<VBProject> projects)
194
202
}
195
203
}
196
204
197
- public void LoadNewComReferences ( )
198
- {
199
- LoadComReferences ( _state . Projects ) ;
200
- }
201
-
202
205
public void UnloadComReference ( Reference reference )
203
206
{
204
207
var referenceId = reference . ReferenceId ( ) ;
0 commit comments