Author: fejj
Date: 2007-05-04 16:59:04 -0400 (Fri, 04 May 2007)
New Revision: 76726

Modified:
   trunk/monodevelop/Extras/CSharpBinding/ChangeLog
   trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
Log:
2007-05-04  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * Parser/Resolver.cs (GetMethod): Check if the cursor is within the
        declaration bounds as well, so that parameter searching works.



Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog    2007-05-04 20:17:37 UTC 
(rev 76725)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog    2007-05-04 20:59:04 UTC 
(rev 76726)
@@ -1,3 +1,8 @@
+2007-05-04  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * Parser/Resolver.cs (GetMethod): Check if the cursor is within the
+       declaration bounds as well, so that parameter searching works.
+
 2007-05-04  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * Test/Test.cs, Gui/ChooseRuntimePanel.cs, Gui/CodeGenerationPanel.cs,

Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs   2007-05-04 
20:17:37 UTC (rev 76725)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs   2007-05-04 
20:59:04 UTC (rev 76726)
@@ -156,7 +156,7 @@
                        if (type.ArrayDimensions != null && 
type.ArrayDimensions.Length > 0) {
                                type = new ReturnType("System.Array");
                        }
-                       Console.WriteLine("Here: Type is " + 
type.FullyQualifiedName);
+                       //Console.WriteLine("Here: Type is " + 
type.FullyQualifiedName);
                        return type;
                }
                
@@ -800,10 +800,13 @@
                IMethod GetMethod()
                {
                        foreach (IMethod method in callingClass.Methods) {
-                               if (method.BodyRegion != null && 
method.BodyRegion.IsInside(caretLine, caretColumn)) {
+                               if (method.Region != null && 
method.Region.IsInside (caretLine, caretColumn))
                                        return method;
-                               }
+                               
+                               if (method.BodyRegion != null && 
method.BodyRegion.IsInside(caretLine, caretColumn))
+                                       return method;
                        }
+                       
                        return null;
                }
                
@@ -822,14 +825,15 @@
                IParameter SearchMethodParameter(string parameter)
                {
                        IMethod method = GetMethod();
-                       if (method == null) {
+                       if (method == null)
                                return null;
-                       }
+                       
                        foreach (IParameter p in method.Parameters) {
                                if (p.Name == parameter) {
                                        return p;
                                }
                        }
+                       
                        return null;
                }
                

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to