Skip to content

Commit dc08ffc

Browse files
committed
comments out codepane handling, because ParentProject is returning null WTF?
see the PR comments
1 parent b839675 commit dc08ffc

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

RetailCoder.VBE/App.cs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,18 @@ private void RefreshSelection(IWindow window)
146146

147147
Declaration selectedDeclaration = null;
148148

149-
//TODO - I doubt this is the best way to check if the SelectedVBComponent and the ActiveCodePane are the same component.
150-
if (windowKind == WindowKind.CodeWindow || (!_vbe.SelectedVBComponent.IsWrappingNullReference
151-
&& component.ParentProject.ProjectId == pane.CodeModule.Parent.ParentProject.ProjectId
152-
&& component.Name == pane.CodeModule.Parent.Name))
153-
{
154-
selectedDeclaration = _parser.State.FindSelectedDeclaration(pane);
155-
refCount = selectedDeclaration == null ? 0 : selectedDeclaration.References.Count();
156-
caption = _stateBar.GetContextSelectionCaption(_vbe.ActiveCodePane, selectedDeclaration);
157-
}
158-
else if (windowKind == WindowKind.Designer)
149+
//TODO - Reinstate these lines once the host stops crashing - need to theck ParentProject doesn't return null
150+
////TODO - I doubt this is the best way to check if the SelectedVBComponent and the ActiveCodePane are the same component.
151+
//if (windowKind == WindowKind.CodeWindow || (!_vbe.SelectedVBComponent.IsWrappingNullReference
152+
// && component.ParentProject.ProjectId == pane.CodeModule.Parent.ParentProject.ProjectId
153+
// && component.Name == pane.CodeModule.Parent.Name))
154+
//{
155+
// selectedDeclaration = _parser.State.FindSelectedDeclaration(pane);
156+
// refCount = selectedDeclaration == null ? 0 : selectedDeclaration.References.Count();
157+
// caption = _stateBar.GetContextSelectionCaption(_vbe.ActiveCodePane, selectedDeclaration);
158+
//}
159+
//else
160+
if (windowKind == WindowKind.Designer)
159161
{
160162
caption = GetComponentControlsCaption(component);
161163
}

0 commit comments

Comments
 (0)