Skip to content

Commit

Permalink
Correct the missed conditional for LOAD_USER_COM_PROJECTS
Browse files Browse the repository at this point in the history
  • Loading branch information
bclothier committed Oct 14, 2019
1 parent f202cad commit c0d947f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Rubberduck.Parsing/VBA/ParseCoordinator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,7 @@ private void ExecuteCommonParseActivities(IReadOnlyCollection<QualifiedModuleNam
_parserStateManager.SetStatusAndFireStateChanged(this, ParserState.LoadingReference, token);
token.ThrowIfCancellationRequested();

RefreshUserComProjects(toParse, newProjectIds);
token.ThrowIfCancellationRequested();

SyncDeclarationsFromUserComProjects(toParse, token, toReresolveReferences);
ProcessUserComProjects(ref token, ref toParse, ref toReresolveReferences, ref newProjectIds);

SyncComReferences(toParse, token, toReresolveReferences);
token.ThrowIfCancellationRequested();
Expand Down Expand Up @@ -337,6 +334,17 @@ private void ExecuteCommonParseActivities(IReadOnlyCollection<QualifiedModuleNam
token.ThrowIfCancellationRequested();
}

//TODO: Remove the conditional compilation after loading from typelibs actually works.
//TODO: Improve the handling to avoid host crashing. See https://github.com/rubberduck-vba/Rubberduck/issues/5217
[Conditional("LOAD_USER_COM_PROJECTS")]
private void ProcessUserComProjects(ref CancellationToken token, ref IReadOnlyCollection<QualifiedModuleName> toParse, ref HashSet<QualifiedModuleName> toReresolveReferences, ref IReadOnlyCollection<string> newProjectIds)
{
RefreshUserComProjects(toParse, newProjectIds);
token.ThrowIfCancellationRequested();

SyncDeclarationsFromUserComProjects(toParse, token, toReresolveReferences);
}

private void SyncComReferences(IReadOnlyCollection<QualifiedModuleName> toParse, CancellationToken token, HashSet<QualifiedModuleName> toReresolveReferences)
{
_parsingStageService.SyncComReferences(token);
Expand Down

0 comments on commit c0d947f

Please sign in to comment.