Skip to content

Commit 14d5aad

Browse files
committed
removed hook->refreshselection middlemen
1 parent 3d210e7 commit 14d5aad

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

RetailCoder.VBE/App.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public class App : IDisposable
4444
private readonly IDictionary<VBProjectsEventsSink, Tuple<IConnectionPoint, int>> _referencesEventsConnectionPoints =
4545
new Dictionary<VBProjectsEventsSink, Tuple<IConnectionPoint, int>>();
4646

47-
private readonly IDictionary<Type, Action> _hookActions;
48-
4947
public App(VBE vbe, IMessageBox messageBox,
5048
IRubberduckParser parser,
5149
IGeneralConfigService configService,
@@ -84,13 +82,6 @@ public App(VBE vbe, IMessageBox messageBox,
8482

8583
_projectsEventsConnectionPoint.Advise(sink, out _projectsEventsCookie);
8684

87-
_hookActions = new Dictionary<Type, Action>
88-
{
89-
{ typeof(MouseHook), HandleMouseMessage },
90-
{ typeof(KeyboardHook), HandleKeyboardMessage },
91-
};
92-
93-
9485
UiDispatcher.Initialize();
9586
}
9687

@@ -107,21 +98,6 @@ private void State_StatusMessageUpdate(object sender, RubberduckStatusMessageEve
10798
}
10899

109100
private void _hooks_MessageReceived(object sender, HookEventArgs e)
110-
{
111-
var hookType = sender.GetType();
112-
Action action;
113-
if (_hookActions.TryGetValue(hookType, out action))
114-
{
115-
action.Invoke();
116-
}
117-
}
118-
119-
private void HandleMouseMessage()
120-
{
121-
RefreshSelection();
122-
}
123-
124-
private void HandleKeyboardMessage()
125101
{
126102
RefreshSelection();
127103
}

0 commit comments

Comments
 (0)