@@ -14,12 +14,12 @@ public class UseMeaningfulNameInspectionResult : CodeInspectionResultBase
14
14
{
15
15
private readonly IEnumerable < CodeInspectionQuickFix > _quickFixes ;
16
16
17
- public UseMeaningfulNameInspectionResult ( IInspection inspection , Declaration target , RubberduckParserState parserState , ICodePaneWrapperFactory wrapperFactory )
17
+ public UseMeaningfulNameInspectionResult ( IInspection inspection , Declaration target , RubberduckParserState parserState , ICodePaneWrapperFactory wrapperFactory , IMessageBox messageBox )
18
18
: base ( inspection , string . Format ( inspection . Description , target . IdentifierName ) , target )
19
19
{
20
20
_quickFixes = new [ ]
21
21
{
22
- new RenameDeclarationQuickFix ( target . Context , target . QualifiedSelection , target , parserState , wrapperFactory ) ,
22
+ new RenameDeclarationQuickFix ( target . Context , target . QualifiedSelection , target , parserState , wrapperFactory , messageBox ) ,
23
23
} ;
24
24
}
25
25
@@ -34,13 +34,15 @@ public class RenameDeclarationQuickFix : CodeInspectionQuickFix
34
34
private readonly Declaration _target ;
35
35
private readonly RubberduckParserState _parserState ;
36
36
private readonly ICodePaneWrapperFactory _wrapperFactory ;
37
+ private readonly IMessageBox _messageBox ;
37
38
38
- public RenameDeclarationQuickFix ( ParserRuleContext context , QualifiedSelection selection , Declaration target , RubberduckParserState parserState , ICodePaneWrapperFactory wrapperFactory )
39
+ public RenameDeclarationQuickFix ( ParserRuleContext context , QualifiedSelection selection , Declaration target , RubberduckParserState parserState , ICodePaneWrapperFactory wrapperFactory , IMessageBox messageBox )
39
40
: base ( context , selection , string . Format ( RubberduckUI . Rename_DeclarationType , RubberduckUI . ResourceManager . GetString ( "DeclarationType_" + target . DeclarationType , RubberduckUI . Culture ) ) )
40
41
{
41
42
_target = target ;
42
43
_parserState = parserState ;
43
44
_wrapperFactory = wrapperFactory ;
45
+ _messageBox = messageBox ;
44
46
}
45
47
46
48
public override void Fix ( )
@@ -49,8 +51,8 @@ public override void Fix()
49
51
50
52
using ( var view = new RenameDialog ( ) )
51
53
{
52
- var factory = new RenamePresenterFactory ( vbe , view , _parserState , new MessageBox ( ) , _wrapperFactory ) ;
53
- var refactoring = new RenameRefactoring ( factory , new ActiveCodePaneEditor ( vbe , _wrapperFactory ) , new MessageBox ( ) ) ;
54
+ var factory = new RenamePresenterFactory ( vbe , view , _parserState , _messageBox , _wrapperFactory ) ;
55
+ var refactoring = new RenameRefactoring ( factory , new ActiveCodePaneEditor ( vbe , _wrapperFactory ) , _messageBox ) ;
54
56
refactoring . Refactor ( _target ) ;
55
57
}
56
58
}
0 commit comments