Skip to content

Commit 7d11c51

Browse files
committed
Remove the great grand-dady of all abstract factories.
1 parent 6982b5e commit 7d11c51

File tree

48 files changed

+105
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+105
-149
lines changed

RetailCoder.VBE/App.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using Rubberduck.UI.CodeInspections;
1212
using Rubberduck.UI.ParserErrors;
1313
using Rubberduck.VBEditor;
14-
using Rubberduck.VBEditor.VBEInterfaces;
1514
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
1615

1716
namespace Rubberduck
@@ -24,7 +23,7 @@ public class App : IDisposable
2423
private ParserErrorsPresenter _parserErrorsPresenter;
2524
private readonly IGeneralConfigService _configService = new ConfigurationLoader();
2625
private readonly ActiveCodePaneEditor _editor;
27-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
26+
private readonly IRubberduckCodePaneFactory _factory;
2827
private IRubberduckParser _parser;
2928

3029
private Configuration _config;

RetailCoder.VBE/Inspections/CodeInspectionResultBase.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
using Rubberduck.Parsing.Nodes;
66
using Rubberduck.Parsing.Symbols;
77
using Rubberduck.VBEditor;
8-
using Rubberduck.VBEditor.VBEInterfaces;
98
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
109

1110
namespace Rubberduck.Inspections
1211
{
1312
public abstract class CodeInspectionResultBase : ICodeInspectionResult
1413
{
15-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
14+
private readonly IRubberduckCodePaneFactory _factory;
1615

17-
protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, Declaration target, IRubberduckFactory<IRubberduckCodePane> factory)
16+
protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, Declaration target, IRubberduckCodePaneFactory factory)
1817
: this(inspection, type, target.QualifiedName.QualifiedModuleName, null)
1918
{
2019
_target = target;

RetailCoder.VBE/Inspections/DefaultProjectNameInspection.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
using Rubberduck.Parsing;
44
using Rubberduck.Parsing.Symbols;
55
using Rubberduck.UI;
6-
using Rubberduck.VBEditor.VBEInterfaces;
76
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
87

98
namespace Rubberduck.Inspections
109
{
1110
class GenericProjectNameInspection : IInspection
1211
{
13-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
12+
private readonly IRubberduckCodePaneFactory _factory;
1413

15-
public GenericProjectNameInspection(IRubberduckFactory<IRubberduckCodePane> factory)
14+
public GenericProjectNameInspection(IRubberduckCodePaneFactory factory)
1615
{
1716
_factory = factory;
1817
Severity = CodeInspectionSeverity.Suggestion;

RetailCoder.VBE/Inspections/DefaultProjectNameInspectionResult.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
using Rubberduck.Refactorings.Rename;
66
using Rubberduck.UI;
77
using Rubberduck.UI.Refactorings;
8-
using Rubberduck.VBEditor.VBEInterfaces;
98
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
109

1110
namespace Rubberduck.Inspections
1211
{
1312
public class GenericProjectNameInspectionResult : CodeInspectionResultBase
1413
{
1514
private readonly VBProjectParseResult _parseResult;
16-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
15+
private readonly IRubberduckCodePaneFactory _factory;
1716

18-
public GenericProjectNameInspectionResult(string inspection, CodeInspectionSeverity type, Declaration target, VBProjectParseResult parseResult, IRubberduckFactory<IRubberduckCodePane> factory)
17+
public GenericProjectNameInspectionResult(string inspection, CodeInspectionSeverity type, Declaration target, VBProjectParseResult parseResult, IRubberduckCodePaneFactory factory)
1918
: base(inspection, type, target, factory)
2019
{
2120
_parseResult = parseResult;

RetailCoder.VBE/Inspections/MultipleDeclarationsInspection.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
using Rubberduck.Parsing;
55
using Rubberduck.Parsing.Symbols;
66
using Rubberduck.UI;
7-
using Rubberduck.VBEditor.VBEInterfaces;
87
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
98

109
namespace Rubberduck.Inspections
1110
{
1211
public class MultipleDeclarationsInspection : IInspection
1312
{
14-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
13+
private readonly IRubberduckCodePaneFactory _factory;
1514

16-
public MultipleDeclarationsInspection(IRubberduckFactory<IRubberduckCodePane> factory)
15+
public MultipleDeclarationsInspection(IRubberduckCodePaneFactory factory)
1716
{
1817
_factory = factory;
1918
Severity = CodeInspectionSeverity.Warning;

RetailCoder.VBE/Inspections/MultipleDeclarationsInspectionResult.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
using Rubberduck.Parsing.Grammar;
77
using Rubberduck.UI;
88
using Rubberduck.VBEditor;
9-
using Rubberduck.VBEditor.VBEInterfaces;
109
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
1110

1211
namespace Rubberduck.Inspections
1312
{
1413
public class MultipleDeclarationsInspectionResult : CodeInspectionResultBase
1514
{
16-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
15+
private readonly IRubberduckCodePaneFactory _factory;
1716

1817
public MultipleDeclarationsInspectionResult(string inspection, CodeInspectionSeverity type,
19-
QualifiedContext<ParserRuleContext> qualifiedContext, IRubberduckFactory<IRubberduckCodePane> factory)
18+
QualifiedContext<ParserRuleContext> qualifiedContext, IRubberduckCodePaneFactory factory)
2019
: base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
2120
{
2221
_factory = factory;

RetailCoder.VBE/Inspections/OptionBaseInspection.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
using Rubberduck.Parsing.Grammar;
55
using Rubberduck.Parsing.Symbols;
66
using Rubberduck.UI;
7-
using Rubberduck.VBEditor.VBEInterfaces;
87
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
98

109
namespace Rubberduck.Inspections
1110
{
1211
public class OptionBaseInspection : IInspection
1312
{
14-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
13+
private readonly IRubberduckCodePaneFactory _factory;
1514

16-
public OptionBaseInspection(IRubberduckFactory<IRubberduckCodePane> factory)
15+
public OptionBaseInspection(IRubberduckCodePaneFactory factory)
1716
{
1817
_factory = factory;
1918
Severity = CodeInspectionSeverity.Warning;

RetailCoder.VBE/Inspections/OptionBaseInspectionResult.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
using System.Collections.Generic;
33
using Rubberduck.Parsing.Nodes;
44
using Rubberduck.VBEditor;
5-
using Rubberduck.VBEditor.VBEInterfaces;
65
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
76

87
namespace Rubberduck.Inspections
98
{
109
public class OptionBaseInspectionResult : CodeInspectionResultBase
1110
{
12-
public OptionBaseInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName, IRubberduckFactory<IRubberduckCodePane> factory)
11+
public OptionBaseInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName, IRubberduckCodePaneFactory factory)
1312
: base(inspection, type, new CommentNode("", new QualifiedSelection(qualifiedName, Selection.Home, factory)))
1413
{
1514
}

RetailCoder.VBE/Inspections/OptionExplicitInspection.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
using Rubberduck.Parsing.Grammar;
55
using Rubberduck.Parsing.Symbols;
66
using Rubberduck.UI;
7-
using Rubberduck.VBEditor.VBEInterfaces;
87
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
98

109
namespace Rubberduck.Inspections
1110
{
1211
public class OptionExplicitInspection : IInspection
1312
{
14-
private readonly IRubberduckFactory<IRubberduckCodePane> _factory;
13+
private readonly IRubberduckCodePaneFactory _factory;
1514

16-
public OptionExplicitInspection(IRubberduckFactory<IRubberduckCodePane> factory)
15+
public OptionExplicitInspection(IRubberduckCodePaneFactory factory)
1716
{
1817
_factory = factory;
1918
Severity = CodeInspectionSeverity.Warning;

RetailCoder.VBE/Inspections/OptionExplicitInspectionResult.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
using Rubberduck.Parsing.Grammar;
44
using Rubberduck.Parsing.Nodes;
55
using Rubberduck.VBEditor;
6-
using Rubberduck.VBEditor.VBEInterfaces;
76
using Rubberduck.VBEditor.VBEInterfaces.RubberduckCodePane;
87

98
namespace Rubberduck.Inspections
109
{
1110
public class OptionExplicitInspectionResult : CodeInspectionResultBase
1211
{
13-
public OptionExplicitInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName, IRubberduckFactory<IRubberduckCodePane> factory)
12+
public OptionExplicitInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName, IRubberduckCodePaneFactory factory)
1413
: base(inspection, type, new CommentNode("", new QualifiedSelection(qualifiedName, Selection.Home, factory)))
1514
{
1615
}

0 commit comments

Comments
 (0)