[svn] r6145: nemerle/trunk/ncc: CompilationOptions.n completion/CodeCompletionEngine.n testsuite/completio...

trupill svnadmin at nemerle.org
Thu Mar 2 20:04:48 CET 2006


Log:
Changes to some Code Completion code to correct some minor bugs that 
stopped the Engine to work in MonoDevelop. Change the testcase to see 
whether indentation makes any difference in the Engine.


Author: trupill
Date: Thu Mar  2 20:04:46 2006
New Revision: 6145

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

Modified: nemerle/trunk/ncc/CompilationOptions.n
==============================================================================
--- nemerle/trunk/ncc/CompilationOptions.n	(original)
+++ nemerle/trunk/ncc/CompilationOptions.n	Thu Mar  2 20:04:46 2006
@@ -607,11 +607,11 @@
           for (mutable lev = 0; lev <= value; lev++) {
             foreach (x in levels [lev])
               unless (disabled.Contains (x))
-                currently_enabled.Add (x, null);
+                currently_enabled.Add (x, "");
           }
           enabled.Iter (fun (x, _) {
             unless (currently_enabled.Contains (x))
-              currently_enabled.Add (x, null)
+              currently_enabled.Add (x, "")
           });
         }
       }
@@ -641,7 +641,10 @@
      */
     public IsEnabled (nr : int) : bool
     {
-      currently_enabled.Contains (nr)
+      mutable ena = false;
+      try { ena = currently_enabled.Contains (nr); }
+      catch { | _ => ena = false; }
+      ena
     }
     
     /** Check if given warning is enabled at a given location.  */

Modified: nemerle/trunk/ncc/completion/CodeCompletionEngine.n
==============================================================================
--- nemerle/trunk/ncc/completion/CodeCompletionEngine.n	(original)
+++ nemerle/trunk/ncc/completion/CodeCompletionEngine.n	Thu Mar  2 20:04:46 2006
@@ -207,12 +207,11 @@
             Passes.ScanningPipeline = ScanTypeHierarchy.ProcessDeclaration;
             textWriter = null;
             Message.MessageOccured += Message.MessageEventHandler (process_error_message);
-            
-            Location.Init();
         }
         
         public Init() : void
         {
+            Location.Init();
             if (textWriter == null)
                 Message.InitOutput (System.Console.Out);
             else

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	Thu Mar  2 20:04:46 2006
@@ -5,11 +5,16 @@
 
 namespace Example {
   public class SomeClass {
+  
     public Foo () : void
     {
     }
+    
     public Foo2 () : void
     {
+    
+    
+    
     }
     public Bar () : void
     {



More information about the svn mailing list