[svn] r6150: nemerle/trunk/ncc: completion/CodeCompletionEngine.n testsuite/completion-playground/compl-s2...

trupill svnadmin at nemerle.org
Fri Mar 3 20:34:50 CET 2006


Log:
Some cosmetic changes to Completion Engine code, and some changes to tests.


Author: trupill
Date: Fri Mar  3 20:34:48 2006
New Revision: 6150

Modified:
   nemerle/trunk/ncc/completion/CodeCompletionEngine.n
   nemerle/trunk/ncc/testsuite/completion-playground/compl-s2.n
   nemerle/trunk/ncc/testsuite/completion-playground/compl2.n

Modified: nemerle/trunk/ncc/completion/CodeCompletionEngine.n
==============================================================================
--- nemerle/trunk/ncc/completion/CodeCompletionEngine.n	(original)
+++ nemerle/trunk/ncc/completion/CodeCompletionEngine.n	Fri Mar  3 20:34:48 2006
@@ -229,8 +229,9 @@
             Options.Clear();
             Options.GreedyReferences = true;
             Options.ColorMessages = false;
+            Options.IgnoreConfusion = true;
             
-            LibraryReferenceManager.AddLibrary("mscorlib");
+            LibraryReferenceManager.AddLibrary ("mscorlib");
             LibraryReferenceManager.AddLibrary ("System");
             LibraryReferenceManager.AddLibrary ("Nemerle");
             SystemType.Init ();                 
@@ -687,7 +688,7 @@
                          returnType.IsNested = true;
                      }
                      
-                     returnType.Location = CodeLocation(t.Location.File, t.Location.Line,
+                     returnType.Location = CodeLocation (t.Location.File, t.Location.Line,
                          t.Location.Column, t.Location.EndLine, t.Location.EndColumn);
                      returnType.IsSealed = t.IsSealed;
                      returnType.IsAbstract = t.IsAbstract;
@@ -775,8 +776,8 @@
          fill_common_member_props (member : MemberBuilder, info : NemerleMemberInfo) : void
          {
              info.Name = member.Name;
-             info.Location = CodeLocation(member.Location.File, member.Location.Line, 
-                 member.Location.Column, member.Location.EndLine, member.Location.EndColumn);
+             info.Location = CodeLocation (member.BodyLocation.File, member.BodyLocation.Line, 
+                 member.BodyLocation.Column, member.BodyLocation.EndLine, member.BodyLocation.EndColumn);
              
              info.IsStatic = member.IsStatic;
              info.IsPublic = member.IsPublic;
@@ -836,7 +837,7 @@
          get_field (field : FieldBuilder) : FieldInfo
          {
              mutable returnField = FieldInfo();
-             fill_common_member_props(field, returnField);
+             fill_common_member_props (field, returnField);
              
              returnField.Type = construct_type (field.GetMemType());
              returnField.IsMutable = field.IsMutable;

Modified: nemerle/trunk/ncc/testsuite/completion-playground/compl-s2.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/completion-playground/compl-s2.n	(original)
+++ nemerle/trunk/ncc/testsuite/completion-playground/compl-s2.n	Fri Mar  3 20:34:48 2006
@@ -6,6 +6,8 @@
 namespace Example {
   public class SomeClass {
   
+    mutable n : Loc;
+  
     public Foo () : void
     {
     }

Modified: nemerle/trunk/ncc/testsuite/completion-playground/compl2.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/completion-playground/compl2.n	(original)
+++ nemerle/trunk/ncc/testsuite/completion-playground/compl2.n	Fri Mar  3 20:34:48 2006
@@ -28,9 +28,11 @@
 
 System.Console.WriteLine ("FOUND TYPES\n===========");
 foreach (t in type_tree.Types) {
-  System.Console.WriteLine (t.Name);
+  System.Console.WriteLine ("{0}, {1}/{2} -> {3}/{4}", t.Name, t.Location.Line, t.Location.Column,
+    t.Location.EndLine, t.Location.EndColumn);
   foreach (method in t.Methods) {
-    System.Console.WriteLine ("* " + method.Name);
+    System.Console.WriteLine ("* {0}, {1}/{2} -> {3}/{4}", method.Name, method.Location.Line, method.Location.Column,
+      method.Location.EndLine, method.Location.EndColumn);
     when (method.Name == "Bar")
       the_method = method;
   }
@@ -54,7 +56,8 @@
   System.Console.WriteLine ("Finished");
 }
 
+try_completion ("this.Fo");
 try_completion ("def a = \"a\"; a.");
 try_completion ("string.For");
-try_completion ("this.Fo");
+try_completion ("string.");
 try_completion ("Q");



More information about the svn mailing list