Skip to content

Commit 9dd71c2

Browse files
authored
Update DeclarationSymbolsListener.cs
Qualified controls' `AsTypeName` with `MSForms` library name.
1 parent a8ada3e commit 9dd71c2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Rubberduck.Parsing/Symbols/DeclarationSymbolsListener.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,10 @@ private IEnumerable<IAnnotation> FindAnnotations(int line)
133133
private void DeclareControlsAsMembers(IVBComponent form)
134134
{
135135
if (form.Controls == null) { return; }
136-
var msFormsLib = _state.DeclarationFinder.FindProject("MSForms");
137136

138137
foreach (var control in form.Controls)
139138
{
140-
var typeName = control.TypeName();
139+
var typeName = $"MSForms.{control.TypeName()}";
141140
// The as type declaration should be TextBox, CheckBox, etc. depending on the type.
142141
var declaration = new Declaration(
143142
_qualifiedModuleName.QualifyMemberName(control.Name),
@@ -155,11 +154,6 @@ private void DeclareControlsAsMembers(IVBComponent form)
155154
null,
156155
true);
157156

158-
if (msFormsLib != null)
159-
{
160-
declaration.AsTypeDeclaration = _state.DeclarationFinder.FindClassModule(typeName, msFormsLib, true);
161-
}
162-
163157
AddDeclaration(declaration);
164158
}
165159
}

0 commit comments

Comments
 (0)