[svn] r7212: vs-plugin/trunk: Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Formatter.n Nemerle.VsI...

VladD2 svnadmin at nemerle.org
Fri Jan 5 20:30:07 CET 2007


Log:
Sync AstToolWindow with active view.

Author: VladD2
Date: Fri Jan  5 20:30:05 2007
New Revision: 7212

Modified:
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Formatter.n
   vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleViewFilter.cs

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Formatter.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Formatter.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Formatter.n	Fri Jan  5 20:30:05 2007
@@ -44,12 +44,6 @@
     mutable _endLine = 0;
     [Accessor] _engine : Engine;
 
-    //private this(startLn : int, endLn : int)
-    //{
-    //  _startLine = startLn;
-    //  _endLine = endLn;
-    //}
-
     public this(engine : Engine)
     {
       _engine = engine;

Modified: vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleViewFilter.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleViewFilter.cs	(original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleViewFilter.cs	Fri Jan  5 20:30:05 2007
@@ -21,10 +21,14 @@
 		{
 		}
 
-		public override void OnChangeScrollInfo(IVsTextView view, int iBar, 
-			int iMinUnit, int iMaxUnits, int iVisibleUnits, int iFirstVisibleUnit)
+		public override void OnSetFocus(IVsTextView view)
+		{
+			ShowAst(view);
+			base.OnSetFocus(view);
+		}
+
+		private void ShowAst(IVsTextView view)
 		{
-			base.OnChangeScrollInfo(view, iBar, iMinUnit, iMaxUnits, iVisibleUnits, iFirstVisibleUnit);
 			NemerleSource source = Source as NemerleSource;
 			if (source != null && source.ProjectInfo != null)
 			{
@@ -39,6 +43,13 @@
 			}
 		}
 
+		public override void OnChangeScrollInfo(IVsTextView view, int iBar, 
+			int iMinUnit, int iMaxUnits, int iVisibleUnits, int iFirstVisibleUnit)
+		{
+			base.OnChangeScrollInfo(view, iBar, iMinUnit, iMaxUnits, iVisibleUnits, iFirstVisibleUnit);
+			ShowAst(view);
+		}
+
 		protected override int ExecCommand(ref Guid guidCmdGroup, uint nCmdId, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 		{
 			string txt = null;



More information about the svn mailing list