File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -146,16 +146,18 @@ private void RefreshSelection(IWindow window)
146
146
147
147
Declaration selectedDeclaration = null ;
148
148
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 )
159
161
{
160
162
caption = GetComponentControlsCaption ( component ) ;
161
163
}
You can’t perform that action at this time.
0 commit comments