Author: lluis
Date: 2007-08-14 11:53:25 -0400 (Tue, 14 Aug 2007)
New Revision: 84090
Modified:
trunk/monodevelop/Extras/CSharpBinding/ChangeLog
trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
Log:
* Parser/Resolver.cs: Properly set the showStatic flag after finding a
member in SearchMember. Fixes a problem with nested classes and
enums: members were not properly shown.
Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-08-14 15:43:54 UTC
(rev 84089)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-08-14 15:53:25 UTC
(rev 84090)
@@ -1,5 +1,11 @@
2007-08-14 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+ * Parser/Resolver.cs: Properly set the showStatic flag after finding a
+ member in SearchMember. Fixes a problem with nested classes and enums:
+ members were not properly shown.
+
+2007-08-14 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
* Parser/Resolver.cs: Properly resolve inner class names. Fixes part of
#82414.
Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs 2007-08-14
15:43:54 UTC (rev 84089)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs 2007-08-14
15:53:25 UTC (rev 84090)
@@ -491,18 +491,22 @@
return null;
if (member is IField) {
+ showStatic = false;
if (curType.ClassType == ClassType.Enum)
return type; // enum members have the
type of the enum
else
return ((IField)member).ReturnType;
}
else if (member is IClass) {
+ showStatic = true;
return new ReturnType
(((IClass)member).FullyQualifiedName);
}
else if (member is IProperty) {
+ showStatic = false;
return ((IProperty)member).ReturnType;
}
else if (member is IEvent) {
+ showStatic = false;
return ((IEvent)member).ReturnType;
}
@@ -767,21 +771,18 @@
// Console.WriteLine("No nonstatic member found");
// try if there exists a static member named typeName
+ // SearchMember will reset the showStatic flag if
necessary
showStatic = true;
t = SearchMember(callingClass == null ? null : new
ReturnType(callingClass.FullyQualifiedName), typeName);
- if (t != null) {
- showStatic = false;
+ if (t != null)
return t;
- }
// Console.WriteLine("No static member found");
// try if there exists a static member in outer classes
named typeName
foreach (IClass c in GetOuterClasses()) {
t = SearchMember(callingClass == null ? null :
new ReturnType(c.FullyQualifiedName), typeName);
- if (t != null) {
- showStatic = false;
+ if (t != null)
return t;
- }
}
// Console.WriteLine("No static member in outer classes
found");
// Console.WriteLine("DynamicLookUp resultless");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches