File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,9 @@ protected override bool EvaluateCanExecute(object parameter)
33
33
}
34
34
35
35
var targetInterface = _state . AllUserDeclarations . FindInterface ( selection . Value ) ;
36
-
37
- var targetClass = _state . AllUserDeclarations . SingleOrDefault ( d =>
38
- d . DeclarationType == DeclarationType . ClassModule &&
39
- d . QualifiedSelection . QualifiedName . Equals ( selection . Value . QualifiedName ) ) ;
36
+
37
+ var targetClass = _state . DeclarationFinder . Members ( selection . Value . QualifiedName )
38
+ . SingleOrDefault ( declaration => declaration . DeclarationType == DeclarationType . ClassModule ) ;
40
39
41
40
return targetInterface != null && targetClass != null
42
41
&& ! _state . IsNewOrModified ( targetInterface . QualifiedModuleName )
Original file line number Diff line number Diff line change 1
1
using System . Runtime . InteropServices ;
2
2
using System . Reflection ;
3
3
using System . IO ;
4
- using System . Linq ;
5
4
using Rubberduck . VBEditor . SafeComWrappers . Abstract ;
6
5
7
6
namespace Rubberduck . UnitTesting
You can’t perform that action at this time.
0 commit comments