Skip to content

Commit 313cc56

Browse files
committed
Merge pull request #66 from rubberduck-vba/next
sync with main repo
2 parents 1a7c38d + 5c531c2 commit 313cc56

18 files changed

+3286
-2849
lines changed

RetailCoder.VBE/Common/RubberduckHooks.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -176,29 +176,29 @@ private bool HandleHotkeyMessage(IntPtr wParam)
176176
if (hook != null)
177177
{
178178
hook.OnMessageReceived();
179-
processed = true;
180-
}
179+
processed = true;
180+
}
181181
}
182182
return processed;
183-
}
183+
}
184184

185185
private void HandleActivateAppMessage(IntPtr wParam)
186186
{
187187
const int WA_INACTIVE = 0;
188188
const int WA_ACTIVE = 1;
189189
const int WA_CLICKACTIVE = 2;
190190

191-
switch (LoWord(wParam))
192-
{
193-
case WA_ACTIVE:
191+
switch (LoWord(wParam))
192+
{
193+
case WA_ACTIVE:
194194
case WA_CLICKACTIVE:
195-
Attach();
196-
break;
195+
Attach();
196+
break;
197197

198-
case WA_INACTIVE:
199-
Detach();
200-
break;
201-
}
198+
case WA_INACTIVE:
199+
Detach();
200+
break;
201+
}
202202
}
203203

204204
private static int LoWord(IntPtr dw)
@@ -214,4 +214,4 @@ private IntPtr GetWindowThread(IntPtr hWnd)
214214
return (IntPtr)hThread;
215215
}
216216
}
217-
}
217+
}

RetailCoder.VBE/Inspections/InspectionBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ public abstract class InspectionBase : IInspection
1010
{
1111
protected readonly RubberduckParserState State;
1212
private readonly CodeInspectionSeverity _defaultSeverity;
13+
private readonly string _name;
1314

1415
protected InspectionBase(RubberduckParserState state, CodeInspectionSeverity defaultSeverity = CodeInspectionSeverity.Warning)
1516
{
1617
State = state;
1718
_defaultSeverity = defaultSeverity;
1819
Severity = _defaultSeverity;
20+
_name = GetType().Name;
1921
}
2022

2123
/// <summary>
@@ -42,7 +44,7 @@ protected InspectionBase(RubberduckParserState state, CodeInspectionSeverity def
4244
/// <summary>
4345
/// The inspection type name, obtained by reflection.
4446
/// </summary>
45-
public string Name { get { return GetType().Name; } }
47+
public string Name { get { return _name; } }
4648

4749
/// <summary>
4850
/// Inspection severity level. Can control whether an inspection is enabled.

RetailCoder.VBE/Navigation/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private void ParserState_StateChanged(object sender, EventArgs e)
8080
{
8181
Debug.WriteLine("CodeExplorerViewModel handles StateChanged...");
8282
IsBusy = _state.Status == ParserState.Parsing;
83-
if (_state.Status != ParserState.Parsed)
83+
if (_state.Status != ParserState.Ready)
8484
{
8585
return;
8686
}

RetailCoder.VBE/UI/ToDoItems/ToDoExplorerViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public ICommand RefreshCommand
5151
private async void _state_StateChanged(object sender, EventArgs e)
5252
{
5353
Debug.WriteLine("ToDoExplorerViewModel handles StateChanged...");
54-
if (_state.Status != ParserState.Parsed)
54+
if (_state.Status != ParserState.Ready)
5555
{
5656
return;
5757
}

0 commit comments

Comments
 (0)