@@ -20,11 +20,11 @@ public class App : IDisposable
2020 private readonly VBE _vbe ;
2121 private readonly AddIn _addIn ;
2222 private Inspector _inspector ;
23- private IParserErrorsPresenter _parserErrorsPresenter ;
24- private readonly IConfigurationLoader _configService = new ConfigurationLoader ( ) ;
25- private readonly IActiveCodePaneEditor _editor ;
23+ private ParserErrorsPresenter _parserErrorsPresenter ;
24+ private readonly IGeneralConfigService _configService = new ConfigurationLoader ( ) ;
25+ private readonly ActiveCodePaneEditor _editor ;
2626 private readonly IRubberduckCodePaneFactory _factory ;
27- private readonly IRubberduckParser _parser ;
27+ private IRubberduckParser _parser ;
2828
2929 private Configuration _config ;
3030 private RubberduckMenu _menu ;
@@ -33,21 +33,16 @@ public class App : IDisposable
3333 private bool _displayToolbar = false ;
3434 private Point _toolbarCoords = new Point ( - 1 , - 1 ) ;
3535
36- public App ( VBE vbe , AddIn addIn , IParserErrorsPresenter presenter , IRubberduckParser parser , IRubberduckCodePaneFactory factory , IActiveCodePaneEditor editor )
36+ public App ( VBE vbe , AddIn addIn )
3737 {
3838 _vbe = vbe ;
3939 _addIn = addIn ;
40- _factory = factory ;
41- _parser = parser ;
40+ _factory = new RubberduckCodePaneFactory ( ) ;
4241
43- _parserErrorsPresenter = presenter ;
42+ _parserErrorsPresenter = new ParserErrorsPresenter ( vbe , addIn ) ;
4443 _configService . SettingsChanged += _configService_SettingsChanged ;
4544
46- // todo: figure out why Ninject can't seem to resolve the VBE dependency to ActiveCodePaneEditor if it's in the VBEDitor assembly.
47- // could it be that the VBE type in the two assemblies is actually different?
48- // aren't the two assemblies using the exact same Microsoft.Vbe.Interop assemby?
49-
50- _editor = editor ; // */ new ActiveCodePaneEditor(vbe, _factory);
45+ _editor = new ActiveCodePaneEditor ( vbe , _factory ) ;
5146
5247 LoadConfig ( ) ;
5348
@@ -84,7 +79,7 @@ private void LoadConfig()
8479
8580 private void Setup ( )
8681 {
87- // _parser = new RubberduckParser(_factory);
82+ _parser = new RubberduckParser ( _factory ) ;
8883 _parser . ParseStarted += _parser_ParseStarted ;
8984 _parser . ParserError += _parser_ParserError ;
9085
@@ -155,6 +150,11 @@ private void CleanUp()
155150 _inspector . Dispose ( ) ;
156151 }
157152
153+ if ( _parserErrorsPresenter != null )
154+ {
155+ _parserErrorsPresenter . Dispose ( ) ;
156+ }
157+
158158 if ( _parser != null )
159159 {
160160 _parser . ParseStarted -= _parser_ParseStarted ;
0 commit comments