Skip to content

Commit aed491e

Browse files
committed
Removed special casing of cache invalidation in tests.
1 parent 9a6c465 commit aed491e

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

Rubberduck.Parsing/VBA/ParseCoordinator.cs

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private void ParseInternal(CancellationToken token)
135135
try
136136
{
137137
Monitor.Enter(_parsingRunSyncObject, ref lockTaken);
138-
ParseInternalInternal(token);
138+
ParseAllInternal(this, token);
139139
}
140140
catch (OperationCanceledException)
141141
{
@@ -147,35 +147,6 @@ private void ParseInternal(CancellationToken token)
147147
}
148148
}
149149

150-
private void ParseInternalInternal(CancellationToken token)
151-
{
152-
token.ThrowIfCancellationRequested();
153-
154-
_parserStateManager.SetStatusAndFireStateChanged(this, ParserState.Pending, token);
155-
token.ThrowIfCancellationRequested();
156-
157-
_projectManager.RefreshProjects();
158-
token.ThrowIfCancellationRequested();
159-
160-
var modules = _projectManager.AllModules();
161-
token.ThrowIfCancellationRequested();
162-
163-
// tests do not fire events when components are removed--clear components
164-
ClearComponentsForTests();
165-
token.ThrowIfCancellationRequested();
166-
167-
ExecuteCommonParseActivities(modules, new List<QualifiedModuleName>(), token);
168-
}
169-
170-
private void ClearComponentsForTests()
171-
{
172-
foreach (var tree in State.ParseTrees)
173-
{
174-
State.ClearStateCache(tree.Key); // handle potentially removed components without crashing
175-
_parsingCacheService.ClearModuleToModuleReferencesFromModule(tree.Key);
176-
_parsingCacheService.ClearModuleToModuleReferencesToModule(tree.Key);
177-
}
178-
}
179150

180151
private void ExecuteCommonParseActivities(IReadOnlyCollection<QualifiedModuleName> toParse, IReadOnlyCollection<QualifiedModuleName> toReresolveReferencesInput, CancellationToken token)
181152
{

0 commit comments

Comments
 (0)