Skip to content

Commit

Permalink
make FindAllImplementations work on class modules again.
Browse files Browse the repository at this point in the history
  • Loading branch information
retailcoder committed May 7, 2021
1 parent 822ddb1 commit ffb75b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rubberduck.Core/UI/Controls/FindAllImplementationsService.cs
Expand Up @@ -38,7 +38,7 @@ public class FindAllImplementationsService : IDisposable

public bool CanFind(Declaration declaration)
{
return declaration is ModuleBodyElementDeclaration moduleBody &&
return declaration is ClassModuleDeclaration || declaration is ModuleBodyElementDeclaration moduleBody &&
moduleBody.Accessibility == Accessibility.Public &&
declaration.ParentDeclaration is ClassModuleDeclaration;
}
Expand Down Expand Up @@ -151,7 +151,7 @@ private SearchResultsViewModel CreateViewModel(Declaration target)

var results = implementations.Select(declaration =>
new SearchResultItem(
declaration.ParentScopeDeclaration,
declaration is ClassModuleDeclaration ? declaration : declaration.ParentScopeDeclaration,
new NavigateCodeEventArgs(declaration.QualifiedName.QualifiedModuleName, declaration.Selection),
GetModuleLine(declaration.QualifiedName.QualifiedModuleName, declaration.Selection.StartLine)));

Expand Down

0 comments on commit ffb75b6

Please sign in to comment.