Skip to content

Commit 61eedc9

Browse files
committed
hello code inspections!! todo: reparse modified modules after applying quick-fixes
1 parent 16a40ed commit 61eedc9

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

RetailCoder.VBE/UI/CodeInspections/InspectionResultsViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public IInspection SelectedInspection
131131

132132
public bool CanRefresh
133133
{
134-
get { return _canRefresh; }
134+
get { return true /*_canRefresh*/; }
135135
private set
136136
{
137137
_canRefresh = value;
@@ -259,6 +259,11 @@ private void ExecuteQuickFixInProjectCommand(object parameter)
259259

260260
private void ExecuteCopyResultsCommand(object parameter)
261261
{
262+
if (_results == null)
263+
{
264+
return;
265+
}
266+
262267
var results = string.Join("\n", _results.Select(result => result.ToString()), "\n");
263268
var resource = _results.Count == 1
264269
? RubberduckUI.CodeInspections_NumberOfIssuesFound_Singular

Rubberduck.Parsing/Symbols/Declaration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ public void ClearReferences()
104104
}
105105

106106
private readonly string _annotations;
107-
public string Annotations { get { return _annotations; } }
107+
public string Annotations { get { return _annotations ?? string.Empty; } }
108108

109109
public bool IsInspectionDisabled(string inspectionName)
110110
{
111-
return _annotations.Contains(Grammar.Annotations.IgnoreInspection)
112-
&& _annotations.Contains(inspectionName);
111+
return Annotations.Contains(Grammar.Annotations.IgnoreInspection)
112+
&& Annotations.Contains(inspectionName);
113113
}
114114

115115
public void AddReference(IdentifierReference reference)

0 commit comments

Comments
 (0)