Skip to content

Commit f9a7165

Browse files
committed
Pull with conflicts
2 parents 2bfc4f4 + e6b454e commit f9a7165

File tree

74 files changed

+334
-243
lines changed

Some content is hidden

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

74 files changed

+334
-243
lines changed

RetailCoder.VBE/Navigation/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Linq;
55
using System.Windows.Input;
66
using Microsoft.Vbe.Interop;
7+
using NLog;
78
using Rubberduck.Navigation.Folders;
89
using Rubberduck.Parsing.Annotations;
910
using Rubberduck.Parsing.Symbols;
@@ -30,7 +31,7 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
3031
_state.StateChanged += ParserState_StateChanged;
3132
_state.ModuleStateChanged += ParserState_ModuleStateChanged;
3233

33-
_refreshCommand = new DelegateCommand(param => _state.OnParseRequested(this),
34+
_refreshCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), param => _state.OnParseRequested(this),
3435
param => !IsBusy && _state.IsDirty());
3536

3637
_refreshComponentCommand = commands.OfType<CodeExplorer_RefreshComponentCommand>().FirstOrDefault();
@@ -54,7 +55,7 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
5455
_externalRemoveCommand = commands.OfType<CodeExplorer_RemoveCommand>().FirstOrDefault();
5556
if (_externalRemoveCommand != null)
5657
{
57-
_removeCommand = new DelegateCommand(ExecuteRemoveComand, _externalRemoveCommand.CanExecute);
58+
_removeCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteRemoveComand, _externalRemoveCommand.CanExecute);
5859
}
5960

6061
_printCommand = commands.OfType<CodeExplorer_PrintCommand>().FirstOrDefault();
@@ -64,13 +65,13 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
6465

6566
_copyResultsCommand = commands.OfType<CodeExplorer_CopyResultsCommand>().FirstOrDefault();
6667

67-
_setNameSortCommand = new DelegateCommand(param =>
68+
_setNameSortCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), param =>
6869
{
6970
SortByName = (bool)param;
7071
SortBySelection = !(bool)param;
7172
});
7273

73-
_setSelectionSortCommand = new DelegateCommand(param =>
74+
_setSelectionSortCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), param =>
7475
{
7576
SortBySelection = (bool)param;
7677
SortByName = !(bool)param;

RetailCoder.VBE/Root/FatalExceptionInterceptor.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

RetailCoder.VBE/Root/RubberduckModule.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,6 @@ private void BindCommandsToMenuItems()
326326

327327
binding.When(request => whenCommandMenuItemCondition(request) || whenHooksCondition(request))
328328
.InSingletonScope();
329-
330-
binding.Intercept().With<FatalExceptionInterceptor>();
331329
}
332330
}
333331
catch (InvalidOperationException)

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@
392392
<Compile Include="Refactorings\ExtractMethod\IExtractMethodProc.cs" />
393393
<Compile Include="Refactorings\ExtractMethod\IExtractMethodRule.cs" />
394394
<Compile Include="Refactorings\ExtractMethod\IExtractMethodSelectionValidation.cs" />
395-
<Compile Include="Root\FatalExceptionInterceptor.cs" />
396395
<Compile Include="Root\EnumerableCounterInterceptor.cs" />
397396
<Compile Include="Root\InterceptedException.cs" />
398397
<Compile Include="Root\InterceptorBase.cs" />

RetailCoder.VBE/UI/About/AboutControlViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Diagnostics;
33
using System.Reflection;
4-
using System.Windows.Input;
4+
using NLog;
55
using Rubberduck.UI.Command;
66

77
namespace Rubberduck.UI.About
@@ -26,7 +26,7 @@ public CommandBase UriCommand
2626
{
2727
return _uriCommand;
2828
}
29-
return _uriCommand = new DelegateCommand(uri =>
29+
return _uriCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), uri =>
3030
{
3131
Process.Start(new ProcessStartInfo(((Uri)uri).AbsoluteUri));
3232
});

RetailCoder.VBE/UI/CodeExplorer/Commands/CodeExplorer_AddClassModuleCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.Vbe.Interop;
2+
using NLog;
23
using Rubberduck.Navigation.CodeExplorer;
34
using Rubberduck.Parsing.Symbols;
45
using Rubberduck.UI.Command;
@@ -9,17 +10,17 @@ public class CodeExplorer_AddClassModuleCommand : CommandBase
910
{
1011
private readonly VBE _vbe;
1112

12-
public CodeExplorer_AddClassModuleCommand(VBE vbe)
13+
public CodeExplorer_AddClassModuleCommand(VBE vbe) : base(LogManager.GetCurrentClassLogger())
1314
{
1415
_vbe = vbe;
1516
}
1617

17-
public override bool CanExecute(object parameter)
18+
protected override bool CanExecuteImpl(object parameter)
1819
{
1920
return GetDeclaration(parameter) != null || _vbe.VBProjects.Count == 1;
2021
}
2122

22-
public override void Execute(object parameter)
23+
protected override void ExecuteImpl(object parameter)
2324
{
2425
if (parameter != null)
2526
{

RetailCoder.VBE/UI/CodeExplorer/Commands/CodeExplorer_AddStdModuleCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.Vbe.Interop;
2+
using NLog;
23
using Rubberduck.Navigation.CodeExplorer;
34
using Rubberduck.Parsing.Symbols;
45
using Rubberduck.UI.Command;
@@ -9,17 +10,17 @@ public class CodeExplorer_AddStdModuleCommand : CommandBase
910
{
1011
private readonly VBE _vbe;
1112

12-
public CodeExplorer_AddStdModuleCommand(VBE vbe)
13+
public CodeExplorer_AddStdModuleCommand(VBE vbe) : base(LogManager.GetCurrentClassLogger())
1314
{
1415
_vbe = vbe;
1516
}
1617

17-
public override bool CanExecute(object parameter)
18+
protected override bool CanExecuteImpl(object parameter)
1819
{
1920
return GetDeclaration(parameter) != null || _vbe.VBProjects.Count == 1;
2021
}
2122

22-
public override void Execute(object parameter)
23+
protected override void ExecuteImpl(object parameter)
2324
{
2425
if (parameter != null)
2526
{

RetailCoder.VBE/UI/CodeExplorer/Commands/CodeExplorer_AddTestModuleCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.Vbe.Interop;
2+
using NLog;
23
using Rubberduck.Navigation.CodeExplorer;
34
using Rubberduck.Parsing.Symbols;
45
using Rubberduck.UI.Command;
@@ -11,18 +12,18 @@ public class CodeExplorer_AddTestModuleCommand : CommandBase
1112
private readonly VBE _vbe;
1213
private readonly NewUnitTestModuleCommand _newUnitTestModuleCommand;
1314

14-
public CodeExplorer_AddTestModuleCommand(VBE vbe, NewUnitTestModuleCommand newUnitTestModuleCommand)
15+
public CodeExplorer_AddTestModuleCommand(VBE vbe, NewUnitTestModuleCommand newUnitTestModuleCommand) : base(LogManager.GetCurrentClassLogger())
1516
{
1617
_vbe = vbe;
1718
_newUnitTestModuleCommand = newUnitTestModuleCommand;
1819
}
1920

20-
public override bool CanExecute(object parameter)
21+
protected override bool CanExecuteImpl(object parameter)
2122
{
2223
return GetDeclaration(parameter) != null || _vbe.VBProjects.Count == 1;
2324
}
2425

25-
public override void Execute(object parameter)
26+
protected override void ExecuteImpl(object parameter)
2627
{
2728
if (parameter != null)
2829
{

RetailCoder.VBE/UI/CodeExplorer/Commands/CodeExplorer_AddUserFormCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.Vbe.Interop;
2+
using NLog;
23
using Rubberduck.Navigation.CodeExplorer;
34
using Rubberduck.Parsing.Symbols;
45
using Rubberduck.UI.Command;
@@ -9,17 +10,17 @@ public class CodeExplorer_AddUserFormCommand : CommandBase
910
{
1011
private readonly VBE _vbe;
1112

12-
public CodeExplorer_AddUserFormCommand(VBE vbe)
13+
public CodeExplorer_AddUserFormCommand(VBE vbe) : base(LogManager.GetCurrentClassLogger())
1314
{
1415
_vbe = vbe;
1516
}
1617

17-
public override bool CanExecute(object parameter)
18+
protected override bool CanExecuteImpl(object parameter)
1819
{
1920
return GetDeclaration(parameter) != null || _vbe.VBProjects.Count == 1;
2021
}
2122

22-
public override void Execute(object parameter)
23+
protected override void ExecuteImpl(object parameter)
2324
{
2425
if (parameter != null)
2526
{

RetailCoder.VBE/UI/CodeExplorer/Commands/CodeExplorer_CommitCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using NLog;
12
using Rubberduck.Navigation.CodeExplorer;
23
using Rubberduck.UI.Command;
34
using Rubberduck.UI.SourceControl;
@@ -8,17 +9,17 @@ public class CodeExplorer_CommitCommand : CommandBase
89
{
910
private readonly SourceControlDockablePresenter _presenter;
1011

11-
public CodeExplorer_CommitCommand(SourceControlDockablePresenter presenter)
12+
public CodeExplorer_CommitCommand(SourceControlDockablePresenter presenter) : base(LogManager.GetCurrentClassLogger())
1213
{
1314
_presenter = presenter;
1415
}
1516

16-
public override bool CanExecute(object parameter)
17+
protected override bool CanExecuteImpl(object parameter)
1718
{
1819
return parameter is CodeExplorerComponentViewModel;
1920
}
2021

21-
public override void Execute(object parameter)
22+
protected override void ExecuteImpl(object parameter)
2223
{
2324
_presenter.Show();
2425

0 commit comments

Comments
 (0)