[svn] r7422: vs-plugin/trunk: Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n Nemerle.Comp...

VladD2 svnadmin at nemerle.org
Wed Feb 14 04:10:00 CET 2007


Log:
Fix 788 (The integration does not use newly added references until VS reloaded)
TODO: Fix Remove references.

Author: VladD2
Date: Wed Feb 14 04:09:58 2007
New Revision: 7422

Modified:
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.crud.n
   vs-plugin/trunk/Nemerle.VsIntegration/CodeSnippets/Snippets/enum.snippet
   vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n	Wed Feb 14 04:09:58 2007
@@ -67,7 +67,11 @@
       // behaviour is automatically provided by Run, but completion
       // engine does not use it at the moment.. :(
       when (Hierarchy != null)
+      {
         Hierarchy.RemoveProgramTypes();
+        when (_state == EngineState.Pure)
+          Hierarchy = null;
+      }
      
       //InitCompiler ();
       LoadExternalLibraries ();

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.crud.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.crud.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.crud.n	Wed Feb 14 04:09:58 2007
@@ -20,11 +20,13 @@
   {
     public AddLibrary(path : string) : void
     {
+      _state = EngineState.Pure;
       LibrariesManager.AddLibrary(path);
     }
 
     public AddAssembly(assembly : SR.Assembly) : void
     {
+      _state = EngineState.Pure;
       LibrariesManager.AddAssembly(assembly);
     }
   } // end class Engine

Modified: vs-plugin/trunk/Nemerle.VsIntegration/CodeSnippets/Snippets/enum.snippet
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/CodeSnippets/Snippets/enum.snippet	(original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/CodeSnippets/Snippets/enum.snippet	Wed Feb 14 04:09:58 2007
@@ -22,7 +22,7 @@
 			<Code Language="Nemerle">
 <![CDATA[enum $name$
 {
-	$selected$
+	| $selected$
 }$end$
 ]]>
 			</Code>

Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs	(original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs	Wed Feb 14 04:09:58 2007
@@ -83,6 +83,7 @@
 		private Engine _engine;
 		public  Engine  Engine
 		{
+			[DebuggerNonUserCode]
 			get { ManagerClass.Instance = _engine; return _engine; }
 		}
 
@@ -120,7 +121,8 @@
 		{
 			try
 			{
-				Engine.References.Add(assemblyName.CodeBase, Assembly.Load(assemblyName));
+				string path = new Uri(assemblyName.CodeBase).LocalPath;
+				Engine.References.Add(path, Assembly.Load(assemblyName));
 			}
 			catch (Exception ex)
 			{
@@ -132,7 +134,8 @@
 		{
 			try
 			{
-				Engine.References.Remove(assemblyName.CodeBase);
+				string path = new Uri(assemblyName.CodeBase).LocalPath;
+				Engine.References.Remove(path);
 			}
 			catch (Exception ex)
 			{



More information about the svn mailing list